jqGrid tree grid with pager

半腔热情 提交于 2019-12-06 05:51:18

问题


How do we make a tree grid with pager using jqGrid?

I have checked and try the demos, but it didn't show any pager, even though there is a pager div in the code

How do create the pager ?


回答1:


Tree grid has some limitations which are documented:

Pager functionality currently disabled for treeGrid

In other place of the documentation you can read almost the same:

Since jqGrid currently does not support paging, when we have a treegrid the pager elements are disabled automatically.




回答2:


I got pagination to work by modifying the setTreeGrid function. I commented out the following line:

$t.p.pgbuttons = false;$t.p.pginput = false;

The buttons then appeared and the requests were going back to the server to request the information. Now for this I was loading the entire tree to a local variable then using setJSONData to load the data into the tree. It functions the way I would expect it to but I haven't thoroughly tested it.

For RowList $t.p.multiselect = false;$t.p.rowList = [10,15,20,30];




回答3:


According to "New functional for treeGrid" Vyacheslav N. Boyko added this feature to jqGrid.And there is a open issue that demands to apply this feature to jqGrid.




回答4:


Try change d.p.pgbuttons = !1; to d.p.pgbuttons = !0; AND d.p.pginput = !1; to d.p.pginput = !0; AND d.p.rowList = []; to d.p.rowList = [10,50,100]; in block setTreeGrid: function () {...}



来源:https://stackoverflow.com/questions/4193113/jqgrid-tree-grid-with-pager

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