jquery - jqgrid reload grid partially working -
I have a client side jackgood managed, when I remove some external events, then I reload. Everything is fine when I reload the grid with more data, but when I reload it with less data, the amount of rows is wrong. For example, when currently there are 100 rows in the grid and I reload it with 200, then the nav bar shows 200 records. If there are 200 rows and I refresh it with 25 rows, it still shows 200 in the shipping bar instead of showing 25. The code refreshing the grid looks like this:
$ ("# List2") trigger ("GridUnload"); $ .ajax ({url: 'http: // xxx, datatype:' jason ', async: wrong, success: function (data) {gridData = data;}
});
$ ("# list2") SetGridParam ({Data: Grid Data}); $ ("#list2") trigger ("reloadGrid").
I do not think the problem is with the navigation bar because I can clearly hit the next page and see the additional lines.
Thanks
Try changing
$ ("# List2") [0] .refreshIndex (); $ ("#list2") trigger ("reloadGrid"). With
var g = $ ("# list2"); G.setGridParam ({Data: Grid Data}); G [0] .refreshIndex (); G.trigger ("reloadGrid");
See and for details.
Normally you should use the set set url
parameter with respect to setGridParam
postData < Use / code> (see for details)
Comments
Post a Comment