or
| <telerik:GridNumericColumn DataField="PaymentAmount" DataType="System.Decimal" HeaderText="Payment Amount" UniqueName="PaymentAmount" DataFormatString="{0:C2}" NumericType="Currency" ColumnEditorID="GridCurrencyColumnEditor"> |
| </telerik:GridNumericColumn> |
| <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
| <CommandItemTemplate> |
| <asp:CheckBox ID="chkMyCheckBox" Style="float: left" runat="server" Text="My Checkbox" TextAlign="Right" AutoPostBack="true" OnCheckChanged="chkMyCheckBox_CheckChanged" /> |
| </CommandItemTemplate> |
| Dim chk as CheckBox = DirectCast(dgMyGrid.FindControl("chkMyCheckBox"),CheckBox) |
| For Each Item As GridItem In dgMyGrid.Items |
| If Item Is GetType(Telerik.Web.UI.GridCommandItem) Then |
| Dim CommandItem As GridCommandItem = DirectCast(Item, GridCommandItem) |
| Dim Header As GridTHead = DirectCast(CommandItem.NamingContainer, GridTHead) |
| Dim chk1 As CheckBox = DirectCast(Header.FindControl("chkMyCheckBox"), CheckBox) |
| Dim chk2 As CheckBox = DirectCast(CommandItem.FindControl("chkMyCheckBox"), CheckBox) |
| End If |
| Next |