0

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?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Hunt
  • 8,215
  • 28
  • 116
  • 256

3 Answers3

0

One way of going about this is by forcing a .click() event on the search button.

I do it like this:

$("#search_list2").click();
keithxm23
  • 1,280
  • 1
  • 21
  • 41
0

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();
chridam
  • 100,957
  • 23
  • 236
  • 235
0

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
});
Community
  • 1
  • 1
joelretdev
  • 99
  • 4
  • its keeping the dialogbox open even when i load the page , is it possible to close once i click on find ? – Hunt Nov 01 '12 at 16:26
  • It seems that making it a default setting is what is causing it to be open all the time perhaps? – joelretdev Nov 01 '12 at 16:39