paulopmx / Flexigrid

Lightweight but rich data grid with resizable columns and a scrolling data to match the headers, plus an ability to connect to an xml/json based data source using Ajax to load the content.
689 stars 539 forks source link

Problem with type long #146

Open marinabgarcia opened 10 years ago

marinabgarcia commented 10 years ago

Hi! I have a problem with numbers which lenght is bigger than 17 characters. For example, if in my db a row contains "20140711185900112" (data type long) when the flexigrid loads the data appears "20140711185900110" instead of the number that really is in the db. I hope someone can help me. Thank you.

x-moe-x commented 9 years ago

i think this is due to precision problems as numbers in js are generally floating point values. it is more a javascript problem and not a flexigrid one. see this answer for some background: http://stackoverflow.com/a/5812121/944201 workaround: if you don't need to calculate something you could pass it as a string or as it might seem you're using it as some sort of timestamp you yould pass it in a json-object that seperates date from time, like:

{"date":20140711, "time":185900110}