Forum
23:47
10/08/2009
Hi Tony!
There are small problem in data filtering. From one side the option defaultSearch:'cn' of filterToolbar is the best one for the most cases, but it make problems if jqGrid has column with formatter:'select',stype: 'select',edittype:'select'. So if a column contain interger ids which will be displayed as textes with respect of select formatter, then the interger ids will be also filtered using 'cn'. If you select in the example in the 'Source' column the 'JobNotification' which has id=6 then you will see data for 'JobNotification' and 'TestForFileExist' which hat id=16.
To fix the problem one should exclude columns having formatter:'select' from the usage of defaultSearch:'cn' and use 'eq' instead.
Because filtering of data supports no custom functions like index as function I had to increase size of data and use full textes instead of ids and use no formatter:'select'.
I hope the problem will be fixed in one of the next vesrions of jqGrid.
Best regards
Oleg
07:43
Moderators
30/10/2007
Hello Oleg,
Thanks for this.
Actually the problem appear if you perform server side search on integers with operator LIKE. In most databases this does not work.
Also I think that we should not make a software which excludes a lot of particular problems, but rather to give a possiblity to solve them direct with changing some settings .
In your case you will need to set a sopt for that select field. The program first searches for this and then for the defaultSearch.
So in order to solve the problem do this:
{ name:'subSource'... searchoptions:{ sopt:['eq']...}, ...},
If you need to have more options in multiple search dialog do this
{ name:'subSource'... searchoptions:{ sopt:['eq', 'ne'....]...}, ...},
The program check for the first element in sopt when filterToolbar.
Hope this help
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.
13:57
10/08/2009
Thank you very much Tony!
The usage of searchoptions:{ sopt:['eq'] } can solve my problem. Nevertheless it would be better if in a new version of jqGrid, the search option sopt:['eq'] will be set as default for all edittype:'select'.
I has by the way the same problem as described before with two select values which used pure string contain (without formatter:'select'). The name of one select entry war a part of another value (like "Exist" and "NotExist"). So I had to use sopt:['eq'].
By the way I finished the project and will be seen next time more frequently in the jqGrid forum.
Best regards
Oleg
17:14
Moderators
30/10/2007
Thanks.
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.
19:11
Moderators
30/10/2007
Hello,
Added in the GitHub
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:
50 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