jqGrid empty and redisplay
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
精彩评论