Search code examples
javascriptjqueryjqgrid

How to refresh the data in a jqGrid?


I have been trying to get a grid to be updated from the datasource when a button is pushed.

So I have in the click event something like this:

$('#grid').jqGrid('trigger','reloadGrid');

However this does not work and I get an error thrown for unknown method 'trigger'

I have also tried

$('#grid').jqGrid('trigger("reloadGrid")');

How would I execute this function?


Solution

  • $('#grid').trigger( 'reloadGrid' );