Forum


Hi,
I use the filterGrid with the filterModel and the type of the columns is 'select'. This work fine.
Between two reload of the data, I would like to change the values of the select with new values, but this seem no be possible. The model keep always the first values.
Is there a way to empty the values fixed with the first call of filterGrid ?
Thanks and Merry Christmas
Gerard
03:23

Moderators
30/10/2007

Hello,
You can use afterSearch event (see docs) something like
// I suppose you name for the select is myselect
afterSearch : function () {
jQuery("select[@name=myselect]","#filterelem").empty();
// here your code to add new options.
}
Regrds
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.
Thank's Tony.
I always have a problem.
There is a form with a grid, input fields and submit button to select the content of the grid.
Inside the grid there are select boxes to filter rows
On submit action, I use setPostDataItem to fix criteria with content of input fields and then trigger("reloadGrid"). That's OK.
On loadComplete, the select boxes are filled with new values. That's ok
But if there was a filter selected before use submit, the select value is transmitted and I don't obtain the correct data.
If I try using clearSearch() before use setPostDataItem and trigger("reloadGrid"), the additional criteria fix with setPostDataItem are not sended.
Is there a solution ?
Thanks
Gerard
07:55

Moderators
30/10/2007

Hello,
I think there is a simple solution for this. Just emty the div where you create the filterGrid and construct it again with a new one with the desired select values, after two reloads.
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:
41 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