Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
Small Decimal Value in UltraWebGrid
posted

Hi,

I have a UltraWebGrid where its values can be modified through the grid's Row Edit Template.

I have few columns in UltraWebGrid where each them has the DataType "System.Decimal".  If the decimal values in these columns are too small, it displays an exponential value on the field in Row Edit Template.

For example:
- If the value in the grid is 0.000001 (six decimals), then it'll populate 0.000001 onto the field in Row Edit Template. This is OK. 
- But, if the value in the grid is 0.0000001 (seven decimals), then it'll populate 1e-7 onto the field in Row Edit Template. Not OK.

Another wierd thing happens When I try to update the small decimal value back to the grid and trigger the "UpdateRow" server event. The value returned from the particular cell is "False" rather than the number itself. It's not even the number in exponential expression. 

For example, in grid's UpdateRow event:
If the cell value is 0.000001(six decimals), then
 e.Row.Cells(0).Value  ==> 0.000001 (OK)

But, If the cell value is 0.0000001 (or 1e-7, seven decimals)
   e.Row.Cells(0).Value ==> False

Is this a bug?

So, my question is...For small decimal number,

1)  Is there a way for me to display the actual number (not the exponential value) onto field in Row Edit Template?

2) And instead of "False", how can I get the modified number in grid's UpdateRow event?

Please don't tell me to change the column's datatype to String.

Parents Reply Children