-1

I am using jQuery.jqGrid for showing data in Asp.net MVC4 Razor view engine. I have a popup dialog and in this popup dialog I have jqGrid. On the jQuery(document).ready function I called jQuery("#list").jqGrid and now as per my requirement I want to fill this list again by using some other condition. So i got a problem i.e. once jqGrid is filled data after that how to filled it again on any button click event???

Or how to clear exixting data from jqGrid????

Please help me out....

Gaurav Agrawal
  • 4,355
  • 10
  • 42
  • 61

1 Answers1

-1

I got an answer.... Use this code before recall bind function on button click event....

jQuery("#list").GridUnload();
Gaurav Agrawal
  • 4,355
  • 10
  • 42
  • 61
  • You described the problem so: "once jqGrid is filled data after that how to filled it again". If you need just fill the data from the server once more then it's enough to trigger "reloadGrid" event. For example `jQuery("#list").trigger("reloadGrid", [{page:1, current:true}]);` (see [here](http://stackoverflow.com/a/3808014/315935)). Usage of `GridUnload` is really needed only if you have to change the structure of the grid, add new column and so on (like [here](http://stackoverflow.com/a/4920612/315935) for example). – Oleg Oct 14 '13 at 07:49