Callback for When jqGrid Finishes Reloading?

Posted by James on Stack Overflow See other posts from Stack Overflow or by James
Published on 2010-05-13T16:38:57Z Indexed on 2010/05/13 16:54 UTC
Read the original article Hit count: 235

Filed under:
|
|
|

Hi, I am using the jqGrid plug-in and at one point I need to refresh the grid and set the selected row to match the record that I am showing in detail on another section of the page. I have the following code but it does not work:

$("#AllActions").trigger("reloadGrid").setSelection(selectedRow);

The selectedRow parameter comes from an event handler that gets called when the data is changed and the grid needs to be updated.

I'm pretty sure that the problem is that the grid is not loaded when the selection is being set, because if I put a call to alert() between the calls to trigger() and setSelection(), it works.

I would be grateful for any advice.

[Edit]Looks like http://stackoverflow.com/questions/2529581/jqgrids-setselect-does-not-work-after-reloadgrid is related but did not get resolved.[/Edit]

© Stack Overflow or respective owner

Related posts about jqgrid

Related posts about jQuery