Dear All,
I am using Imagistics webgrid for binding data’s from my databases. I had bounded a decimal value to the below column and even I has also specified a DataFormatString as ="{0:0.00}".when I run the page and try to enter some decimal values it shows an error as “Microsoft JScript runtime error: Sys.FormatException: Format specifier was invalid”. I tried several ways, but no result. Could you please help me over this?
For your reference I am pasting below by script of the column in my grid and the scrren shot of the error message which I gets whne I try to enter a decimal values to the cells in the below column.
<ig:BoundDataField DataFieldName="Km" DataType="System.Decimal" Key="Km"
Width="50px" DataFormatString="{0:0.00}" CssClass="style1" >
<Header Text="Km" />
</ig:BoundDataField>
Regards
Rajesh Kamalakshan
Hi Nikifor,
After enbabling editing on this field, same javascript error occurs..
Is there any solutions on this?
did you try enbabling editing on this field. It crashes then!
Hello Ikram,
Please let me know if you have any further questions regarding this issue.
Hello Ikram,Please take a look at the attached from me sample. Sample was tested with IE 9, FF 10 and Chrome latest. Sample contains WDG with two columns – one integer and one decimal. The second column is decimal and is configured to show 3 numbers after the comma.
Dear Nikifor,
Thanks for the help, I made it working by putting the format as below
Width="50px" DataFormatString="{0:n}" CssClass="style1" >
But I am little confused on, how to put the same for 3 decimal places. Right now the above works perfectly for 2 decimal places.