Hi,
I can't force following code to work, meaning the values of the decimals are multiplied by 100 and no combination of DecimalSeparator nor DecimalDigits nor Culture setting renders 5.19m as 5,19 (or 5.19 for that matter) - the result is always 519
I can't force following code to work, meaning the values of the decimals are multiplied by 100 and no combination of DecimalSeparator nor DecimalDigits nor Culture setting renders 5.19m as 5,19 (or 5.19 for that matter) - the result is always 519
<%@ Page Language="C#" AutoEventWireup="true" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager runat="server" ID="ScriptManager1"> </asp:ScriptManager> <script type="text/C#" runat="server"> protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { System.Data.DataTable table = new System.Data.DataTable(); table.Columns.Add("ID", typeof(int)); table.Columns.Add("pct", typeof(decimal)); table.Rows.Add(1, 5.19m); table.Rows.Add(2, 99.49m); table.Rows.Add(3, 19.69m); table.Rows.Add(4, 5.99m); RadGrid1.DataSource = table; } </script> <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" OnNeedDataSource="RadGrid1_NeedDataSource"> <MasterTableView> <Columns> <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID" UniqueName="ID"> </telerik:GridBoundColumn> <telerik:GridTemplateColumn UniqueName="perComplete" HeaderText="Percent Complete" AllowFiltering="false"> <ItemTemplate> <telerik:RadNumericTextBox ID="pct" runat="server" Text='<%#Eval("pct") %>' Width="70px"> <NumberFormat AllowRounding="false" /> </telerik:RadNumericTextBox> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid> </div> </form></body></html>