0

I have some BoundFields that are bonded to double values. If I enable editing on the GridView I get the following example:

Input string was not in a correct format.

I want that in edit mode the decimal separator be "." instead of "," but I can't get it work.

dvjanm
  • 2,351
  • 1
  • 28
  • 42

3 Answers3

0

I set in the Page directive the Culture to "en-US" and it's working.

dvjanm
  • 2,351
  • 1
  • 28
  • 42
0

try it :

<asp:BoundField DataField="Price"
                HeaderText="Price"
                SortExpression="Price"
                DataFormatString="{0:F3}" />
Ramin Asadi
  • 281
  • 2
  • 17
  • This just displays numeric values in fixed format and specify the number of decimal places. It doesn't replaces the "," to ".". – dvjanm Jul 17 '13 at 10:53
0

In Visual Studio set Language in Tools - Options - International Settings to "Same as Microsoft Windows". If your Windows' Regional settings are set correctly, your problem should be solved.