free-jqgrid: getLocalRow return false in free-jqgrid4.13.6

∥☆過路亽.° 提交于 2019-11-29 17:43:20

You can just use

var localData = $("#myGrid").jqGrid("getGridParam", "data");

to get all local data as an array. It's the reference to internal data of jqGrid.

UPDATED: If the grid is sorted or filtered locally and want to get the data from all rows in the same order, then you should get lastSelectedData parameter instead of data. You can force sorting the data locally after loading from the server by usage forceClientSorting: true parameter of jqGrid additionally to loadonce: true.

The demo https://jsfiddle.net/OlegKi/akv51mdq/ demonstrates lastSelectedData in case of local data, which has no id information. Another demo https://jsfiddle.net/OlegKi/Ljejoh21/ do the same with the data loaded from the server at once.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!