开发者

jqgrid server pagination example of record add

I have been working with jqgrid and like it a lot. I am currently wondering if there is a specific way to handle adding records to the grid when doing pagination on the server side. So here is how I think it should work:

1) Enter new record on client side using the grid add feature

2) Send new record to server (without displaying it)

3) Server determines where the new record is to be inserted in the pagination set on the correct page (since the data is sorted the new record needs to be inserted in the pagination mo开发者_StackOverflow社区del that may not currently be displayed)

4) Returns the new set of records (page) to be displayed that contains the new record

5) Preselect the new record in the set

6) Make sure the selected record is seen in the viewable area of the grid

I have tried searching for exactly what I am looking for but have not had much luck. I'm hoping someone here can help shed some light on what I am trying to do. Thanks!


Reload the grid and try function reloadGrid(txtJSON)

{
       jQuery("#list").jqGrid('setGridParam', {postData:{searchDetails:txtJSON}});
       jQuery("#list").trigger("reloadGrid");
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜