Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
wrong filtering of 'select' column in jqGrid 3.8 with defaultSearch:'cn'
04/10/2010
23:47
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

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

06/10/2010
07:43
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

12/10/2010
13:57
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

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

12/10/2010
17:14
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

13/10/2010
14:09
Avatar
sirshurf
Member
Members
Forum Posts: 43
Member Since:
06/10/2009
sp_UserOfflineSmall Offline

Thank you for this post.

I was searching for it yesterday, and was ready today to post it.

I am voting to add this option for the next release

23/10/2010
19:11
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information