Pierre GUILLAUME
Pierre GUILLAUME

Reputation: 449

Is there an Event "After Search" for NavGrid jqGrid

I want to trigger a function after the user search something on my navGrid.

I've found the event loadComplete but that doesn't match with my expectations because I also reload my grid programmatically. Then maybe there is something link to the click... if someone has an idea. Thanks.

Upvotes: 0

Views: 759

Answers (1)

Oleg
Oleg

Reputation: 221997

There are exist onSearch callback (and jqGridFilterSearch jQuery event). It trigger reloadGrid which finish with loadComplete (and jqGridAfterLoadComplete jQuery event). You can set some custom option of jqGrid inside of onSearch callback (for example, $(this).jqGrid("getGridParam").searchingStarted = true;) and to test its value inside of loadComplete. At the end of loadComplete you should always reset the value of the custom option. In the way you can distinguish reloading of the grid started from Searching Dialog from other reloading.

Upvotes: 1

Related Questions