How to get the displayed data of KendoGrid in json format?

后端 未结 5 1940
北海茫月
北海茫月 2020-12-28 13:45

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 followi

5条回答
  •  滥情空心
    2020-12-28 14:10

    For the JSON part, there's a helper function to extract the data in JSON format that can help:

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

    EDIT: after some errors with the above method due to kendo grid behavior, I found this article that solves the problem: Kendo DataSource view not always return observablearray

提交回复
热议问题