Warning: session_write_close() [function.session-write-close]: write failed: No space left on device (28) in /home/trirand/public_html/jqgridwiki/doku.php on line 74

Warning: session_write_close() [function.session-write-close]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php5) in /home/trirand/public_html/jqgridwiki/doku.php on line 74
wiki:singe_searching - jqGrid Wiki

Discussion

atefano Romoli Fenu, 2009/09/07 11:13

How to obtain the same result as the “cancel” button of the search dialog via my own script ?

Problem to solve: If i close the search dialog the grid continue showing the last result. If i want the grid to show all the records without any filters i need to reload the entire page or reopen the search dialog and use the clear button to reset the last search. I've tried to use the onClose event to reload grid but the post data of the search remain active: _search=true and filters=[…..] . So i tried to removePostDataItem(“filters”) and it seems to work but the _search variable remain true. Suggestions ?

Tony Tomov, 2009/09/07 11:25

Hello, The same way you remove the filters - just set (since you use postext module) search parameter to false (note - not _search). Something like setPostDataItem(“search”,false);

Stefano Romoli Fenu, 2009/09/07 15:51

I've tried but doesn't work ! In the way you suggest you set only another variable named “search” (not _search) ? In the PHP code, the check is made on _search. I could change the PHP code but before doing this i prefere to know if there is a way to change the value of the _search variable ? Since the “cancel” button of the search dialog do what i want, i think there is a function that was called by the button and i would like to refere to that function from my own script.

Ken, 2009/09/16 23:07

datepicker showing up behind search.

To ensure the datepicker is on top of the search, it is important to set the z-index to something high.

<style> .ui-datepicker {z-index:1200;} </style>

See this in action on the demo page http://www.trirand.com/jqgrid/jqgrid.html (page source, line 36)

Props to Schmitty who blogged this on http://blog.schmitty.me/?p=129

Diptendu Dutta, 2009/11/26 10:08

We need new option “ResetOnClose”

Most users expect the original grid data to display when they close the search dialog. Could we add a new option ResetOnClose with default value “true” to enable this behaviour.

Having to write code on OnCLose event and mucking around in postdata to achieve this effect seems too much.

fivesixcolor, 2010/04/15 06:41

We need new option “ResetOnClose”too

There is a option “closeAfterSearch” if set to true this closes the search dialog after the user click on Find button. But this wouldnot work after user click on Reset button. There no way to ResetOnClose by writing code.

Richard Fine, 2010/01/21 17:25

This doesn't work for clientside stuff, does it?

Peter Kleynjan, 2010/06/03 12:03

Re ResetOnClose / cancel button:

I guess it's not part of the official API, but I've found one thing that works (in 3.6.5 at least; “$” is my JQuery function):

resetFilter = function(){ $(”.ui-reset”).click(); };

inside the JQ function:

  $("#mygrid").searchGrid({ onClose: resetFilter } );

Feel free to set me straight it there is a better way… -Peter

Thibault, 2011/05/29 17:42

I have a problem with the Single field searching. The display is okay but when I click the Find button nothing happens. I feel he does not know where to look, or he gets no value .. Help!

Nicolas Machado, 2011/09/21 23:39

Hi, I have the same problem, I'm trying SINGLE search and nothing happens. I thing that the samples are incomplete, as I think that $where variable sould be completed with this values: $sField = $_GET['searchField']; $sValue = $_GET['searchString']; $sOper = $_GET['searchOper'];

Am I right ? Regards Hi Again, I added those variables to the ^PHP and it works, is a good idea that a snippet code should be added to the Documentation.


Personal Tools
;