views:

58

answers:

1

Hello, 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?

+3  A: 
$('#grid').trigger( 'reloadGrid' );
Peter Bailey
I do wish they would change the documentation for jqGrid as right now it is a bit deceiving..
Earlz
The `bind()` and `trigger()` methods are part of the jQuery core, FYI
Peter Bailey
@Peter yes they are but their documentation does not make that obvious and the reloadGrid function is not listed in green as somethin requiring a "special method of calling"
Earlz