I have a jqgrid, which expects data from four different sources, what I have done is, I make four different ajax calls, and then add the returned rows to the grid in a loop.
The problem is, the pager does not work any more, instead it displays a scroll bar.
I read that after version 3.7 jqgrid does support paging for local data, I am using 4.1.2, but it does not work.
I believe there must be a parameter that needs to be set, I just cant seem to开发者_开发百科 find it.
Thanks, Ali
the usage of addRowData
is the wrong way. It is not only slow, but it don't support paging and sorting. You will have to reload the grid once to see the data correct.
Much more effective way is to fill all data in an array of items. Every item should has an additional id
property. Then you should create the grid with additional parameter data: items
and use gridview: true
additionally to have better performance.
精彩评论