When restoring JQGrid via jqGridImport search information is incorrect

断了今生、忘了曾经 提交于 2019-11-28 14:12:31
Oleg

The behavior of the bottom bar with the navigator is correct because it is implemented not as the part of grid. So you really have to set it additionally. You can write you own export and import of the settings.

The situation with the additional last line which will be added in the searching dialog is really a small problem which can be fixed with the following code:

var grid = $("#list");
...

grid.searchGrid(prmSearch);
if (typeof(grid[0].p.postData.filters) === "string" &&
    grid[0].p.postData.filters.length>0) {

    $("#fbox_"+grid[0].id).searchFilter().del();
}
$("#fbox_"+grid[0].id).searchFilter().close();

You can see the corresponding demo here. It is a small modification of the demo from my another old answer.

By the way the new filter which will be used in the next version of jqGrid will not have the problem (see the demo here).

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