Quantcast
Channel: Editor — DataTables forums
Viewing all articles
Browse latest Browse all 3744

C# float? rounding issue with "long" numbers

$
0
0

Hi,

I have an Editor field defined in C# as float?. In JS I defined the field and the columns without any particular setting.

If I save, for instance, the value 10.12345, everything is fine, i.e. the value is correctly saved in the DB and is correctly re-loaded.

But if I save, for instance, the value 1000.12345, there are issues:
* in the DB the value saved is 1000.123
* the re-loaded value is 1000.12347

With 10000.12345:
* in the DB the value saved is 10000.12
* the re-loaded value is 10000.123

and so on...

So first of all it seems that the maximum length for a number saved in the DB is 8 (with the dot), e.g. 10000.12

Moreover it seems that there are also issue when the value is reloaded from the DB.

Can you please clarify?

Thanks!


Viewing all articles
Browse latest Browse all 3744

Trending Articles