Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
156
rated 0 times [  158] [ 2]  / answers: 1 / hits: 85978  / 12 Years ago, wed, april 25, 2012, 12:00:00

I have a kendoGrid and i would like to get the JSON out of it after filtering and sorting how do I achieve this?



something like the following,



var grid = $(#grid).data(kendoGrid);

alert(grid.dataSource.data.json); // I could dig through grid.dataSource.data and I see a function ( .json doen't exist I put it there so you know what i want to achieve )


Thanks any help is greatly appreciated!


More From » jquery

 Answers
3

I think you're looking for



var displayedData = $(#YourGrid).data().kendoGrid.dataSource.view()


Then stringify it as follows:



var displayedDataAsJSON = JSON.stringify(displayedData);


Hope this helps!


[#85974] Tuesday, April 24, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
josefn

Total Points: 251
Total Questions: 93
Total Answers: 84

Location: Senegal
Member since Fri, Aug 21, 2020
4 Years ago
;