Forum


16:04

29/08/2008

I have looked through the help forum and found many people having issues with setting the editoptions column property dynamically, STRICTLY FOR SEARCHING.
None of the answers seemed to have solved my problem.
I have this colModel defined.
colModel: [
...
{ name: 'status', label: 'Status', index: 'status', width: 100, sorttype: 'text', edittype: 'select', editoptions: { value: ':'} },
...
]
It appears you have to set 'editoptions' or on the search form, nothing will appear for an input for the that column.
I want to retrieve data dynamically and populate this select input.
I have tried this:
loadComplete: function() {
jQuery("#opportunities").setColProp('status', { editoptions: { value: "1:One;2:Two"} });
}
I have also tried changing the data in the quotes to "1:2", still nothing.
Please note: The data will eventually be populated dynamically, this is just a test.
nothing gets populated. This appears to be simple to do in theory, however, why this does not work is beyond me.
Neal
06:58

Moderators
30/10/2007

Hello,
Which serch method do you have in mind? If this is the build in search in the navigator this will not work. Use filterGrid method for this purpose.
If you use the filterGrid method this will not work too since of the delayed ajax request. I recommend in this case to call filterGrid withsetTimout function in order to read the data crrectly.(after it is obtained from the grid)
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:
78 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