开发者

jqGrid empty and redisplay

开发者 https://www.devze.com 2023-03-06 12:23 出处:网络
I want to remove jqGrid and reDisplay it with another data. is it correct to follow this: $(\"div#disp\").empty().append(\"<table id=\'dis开发者_运维技巧play\'>\");

I want to remove jqGrid and reDisplay it with another data.

is it correct to follow this:

 $("div#disp").empty().append("<table id='dis开发者_运维技巧play'>");
 $("table#display").jqGrid({...});

when div#disp surronds table#display


There are many ways to do what you need. The best way is depend on the exact requirements.

If you just want to change the grid contain without adding or removing a grid column you can just change some grid parameters, postData and probably url and then call $('#list').trigger('reloadGrid').

If you need to show really another grid on the same place the usage of GridUnload method can solve the problem. See here for more information and the demo.

If you need some optimization in removing of grid contain you can do what described here.

jqgrid delete all rows inside grid

0

精彩评论

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