Hi!
I use GridNumericColumn to display some floating-point value. In the ViewMode the value is displayed correctly, according to the current culture's settings (with comma as an digital separator). In the EditMode (EditMode="InPlace") the value is displayed correctly too, but it doesn't use DataFormatString parameter (e.g if the value is 5.0 and DataFormatString="{0:F2}", the value is displayed as 5). It's not really good, but the real problem comes when I'm trying to input some value with fractional part (like 5.323). In my current culture's settings decimal separator is comma, so EditBox doesn't allow me input period, only comma. But when I'm trying to save my input, I receive message like "5,323 is not a valid value for Double". DataSource for RadGrid is ObjectDataSource and it return the list (List<>) of classes. In the code it looks like that:
Single object is defined like that:
Could you tell me why does it happen and what should I do to solve this problem?
I use Q2 2009 Telerik RadControls for ASP.NET
I use GridNumericColumn to display some floating-point value. In the ViewMode the value is displayed correctly, according to the current culture's settings (with comma as an digital separator). In the EditMode (EditMode="InPlace") the value is displayed correctly too, but it doesn't use DataFormatString parameter (e.g if the value is 5.0 and DataFormatString="{0:F2}", the value is displayed as 5). It's not really good, but the real problem comes when I'm trying to input some value with fractional part (like 5.323). In my current culture's settings decimal separator is comma, so EditBox doesn't allow me input period, only comma. But when I'm trying to save my input, I receive message like "5,323 is not a valid value for Double". DataSource for RadGrid is ObjectDataSource and it return the list (List<>) of classes. In the code it looks like that:
| <telerik:GridNumericColumn HeaderText="SomeText" DataField="DoubleField" DataType="System.Double" SortExpression="DoubleField" UniqueName="DoubleField" DataFormatString="{0:F2}" MaxLength="12" NumericType="Number"> |
| <ItemStyle HorizontalAlign="Right" /> |
| <HeaderStyle HorizontalAlign="Right" Width="60px"/> |
| </telerik:GridNumericColumn> |
Single object is defined like that:
| public class MyClass |
| { |
| // properties |
| ... |
| private double mDoubleField; |
| public double DoubleField |
| { |
| get { return mDoubleField; } |
| set { mDoubleField = value; } |
| } |
| ... |
| } |
Could you tell me why does it happen and what should I do to solve this problem?
I use Q2 2009 Telerik RadControls for ASP.NET