■ TextEdit 엘리먼트에서 SQL Server DECIMAL(18, 2) 타입 숫자를 입력하는 방법을 보여준다.
▶ 예제 코드 (XAML)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<Grid xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"> <dxe:TextEdit x:Name="decimalTextEdit" Width="230" Height="30" FontFamily="바탕체" FontSize="16" HorizontalContentAlignment="Right" MaskType="Numeric" Mask="###,###,###,###,###,##0.00" MaskUseAsDisplayFormat="True"> <dxe:TextEdit.EditValue> <s:Decimal>0</s:Decimal> </dxe:TextEdit.EditValue> </dxe:TextEdit> </Grid> |
※ 양수/음수에 관계없이 정수 부분은 18자리, 소숫점 이하 2자리 입력이 가능하며 SQL Server에서도 동일하게 저장된다.