I use RadGridView to edit some data and declare the GridViewMaskBoxColumn in the following way
GridViewMaskBoxColumn widthColumn = new GridViewMaskBoxColumn();
widthColumn.HeaderText = "Width";
widthColumn.FieldName = "Width";
widthColumn.MaskType = MaskType.Numeric;
widthColumn.Mask = "f2";
widthColumn.FormatInfo = CultureInfo.CurrentCulture;
BaseGridView.MasterGridViewTemplate.Columns.Add(widthColumn);
As u can see I even set the culture manually and during debug I see that the culture is "ru-RU" that means I will see the numbers separated width "," instead of "."
That's works fine I see the comma clearly.
But then I set
BaseGridView.CellValidating += new CellValidatingEventHandler(BaseGridView_CellValidating);
to validate if the user entered the data in a valid range for my application.
When debug reaches this action i can see CellValidatingEventArgs.Value defined as "11.11" instead of "11,11" as was shown in the editor.
This leads application to an exception when i try set this value to a float property.
What have i done wrong?
GridViewMaskBoxColumn widthColumn = new GridViewMaskBoxColumn();
widthColumn.HeaderText = "Width";
widthColumn.FieldName = "Width";
widthColumn.MaskType = MaskType.Numeric;
widthColumn.Mask = "f2";
widthColumn.FormatInfo = CultureInfo.CurrentCulture;
BaseGridView.MasterGridViewTemplate.Columns.Add(widthColumn);
As u can see I even set the culture manually and during debug I see that the culture is "ru-RU" that means I will see the numbers separated width "," instead of "."
That's works fine I see the comma clearly.
But then I set
BaseGridView.CellValidating += new CellValidatingEventHandler(BaseGridView_CellValidating);
to validate if the user entered the data in a valid range for my application.
When debug reaches this action i can see CellValidatingEventArgs.Value defined as "11.11" instead of "11,11" as was shown in the editor.
This leads application to an exception when i try set this value to a float property.
What have i done wrong?