I have assigned a GridNumericColumnEditor to a GridNumericColumn as follows:
I have defined the GridNumericColumnEditor as follows:
| <telerik:GridNumericColumn DataField="PaymentAmount" DataType="System.Decimal" HeaderText="Payment Amount" UniqueName="PaymentAmount" DataFormatString="{0:C2}" NumericType="Currency" ColumnEditorID="GridCurrencyColumnEditor"> |
| </telerik:GridNumericColumn> |
I have defined the GridNumericColumnEditor as follows:
| <telerik:GridNumericColumnEditor ID="GridCurrencyColumnEditor" runat="server"> |
| <NumericTextBox Culture="English (United States)" LabelCssClass="" InvalidStyleDuration="100" |
| Type="Currency" runat="server"> |
| <NumberFormat AllowRounding="True" KeepNotRoundedValue="False" DecimalDigits="2"></NumberFormat> |
| </NumericTextBox> |
| </telerik:GridNumericColumnEditor> |
While in edit mode, the currency fields are not being displayed with two decimal places. If I enter 1,234 I get $1,234 displayed when I am expecting to get $1,234.00. If I enter 1,234.1234 I get $1,234.1234 displayed when I am expecting to get $1,234.12.
While in display mode, the formatting works properly based on the DataFormatString attribute in the GridNumericColumn.
Am I doing something wrong with the number formatting?
Al