Forum
09:10
18/11/2009
I'm looking for a method to reload the grid data (from server) without clearing any set search-filters!
The documentation of the refresh-button in the navigator controls says:
"Enables or disables the refresh button in the pager. When the button is clicked a trigger(“reloadGrid”) is executed and the search parameters are cleared"
Is there any attribute I can define when calling the reloadGrid-method to preserve the search parameters?
Or is there any other method which I can use?
Kind regards,
Klaus.
05:22
Moderators
30/10/2007
Hello,
This is partial true. Actually we do not clear the search parameters, but turn the search flag to false. This mean that the search parameters are in the postData object and you can use them.
Here is a trick - you can use the afterRefresh event to turn on the search to true.
...jqGrid('navGrid',{
afterRefresh : function() {
("#mygrid").jqGrid('setGridParam',{search:true});
},
...}...);
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
06:00
18/11/2009
Hello Tony!
I've tried your hint, but that doesn't solve my problem.
The search-parameters seem to be cleared on clicking the refresh button.
1) select a filter and click find ...
POST http://localhost/htmlclient/se.....server.dll
{"_search":true,"nd":1258631399957,"rows":25,"page":1,"sidx":"name","sord":"asc","searchField":"status","searchString":"connected","searchOper":"eq"}
2) then close the dialog and click the refresh button
POST http://localhost/htmlclient/se.....server.dll
{"_search":false,"nd":1258631405494,"rows":25,"page":1,"sidx":"name","sord":"asc","searchField":"","searchString":"","searchOper":""}
"afterRefresh"-event called (log output)
It seems that the afterRefresh event is called too late for this purpose.
I've tried to set the _search-field on the postdata of the serializeGridData function, but the search-fields are already empty.
Do you have another hint for me?
Kind regards,
Klaus
06:05
Moderators
30/10/2007
Hello,
Uppss, sory for this. Right now I look into the code and we call resetFilters which clear the serch's. Should be added soon.
Sorry again.
Also one possible solution is to add a custom Button and then you can control evrething.
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
06:02
Moderators
30/10/2007
Hello,
As we say in the docs - trigger("reloadGrid) - reloads the grid with the current parameters just asking again for data with the last settings in postData.
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
58 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66