문제

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.

도움이 되었습니까?

해결책

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

다른 팁

try it :

<asp:BoundField DataField="Price"
                HeaderText="Price"
                SortExpression="Price"
                DataFormatString="{0:F3}" />

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top