I want to open a search dialog box programmatically in jqgrid.
as after submitting search the ajax request to the server I want to open it again but programmatically, so how can I do that?
One way of going about this is by forcing a .click()
event on the search button.
I do it like this:
$("#search_list2").click();
You could try using the the fbox_
prefix and the grid's id. Suppose your jqGrid
has the id myGridId
then the "Advanced Search" dialog will have id="fbox_myGridId"
. This should then open the search box:
$("#fbox_myGridId").show();
Seems you can set this as an option when using the search grid of jqGrid:
$("#grid").searchGrid({ closeAfterSearch: false });
I found that here, which may relate to your question: Possible to make jqGrid Search Box Stay on Page?
You can also set this as a default for the entire grid:
$.extend($.jgrid.search, {
closeAfterSearch: false
});