This is a migrated thread and some comments may be shown as answers.

Grid display wrong number for very long number

1 Answer 137 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ken
Top achievements
Rank 1
Ken asked on 07 Mar 2018, 05:37 AM

Hi, I try to get the data into the grid for short number (9 digit) it display correctly in the grid but when I fetch long number (15 digits) it will display wrong numbers

for example number 200148078262119 will display as 200148078262120 in the grid. I tried to print_r the data from php and the data that php retrieve is correct.

I open up the inspect element in chrome and the jquery .kendoGrid value is scientific notation "2.0014807826212e+14"

May I know is this the culprit for the grid to display incorrect data?

May I know how to solve it?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 08 Mar 2018, 12:03 PM
Hello, Ken,

I made an example with the provided number and it was shown as expected in the Grid:

https://dojo.telerik.com/uWaxeCig

The Grid should not have an issue displaying the numbers as they are up to 15 digits which is the supported number length by the JavaScript numbers:

https://www.w3schools.com/js/js_numbers.asp

If the issue still occurs, please provide the response JSON from the server and I will gladly assist further.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Ken
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or