Forum
01:16
10/08/2009
Hello Tony!
I answerd to the question on the stackoverflow and could confirm that the user found the bug in jqGrid. The bug in in the grid.base.js file and it take place in both old and new filter plugin which you develop now.
The problem and the solution I described in my answer. I suggest to insert the following very simple code
return self._compareValues(self.equals,f,v,"!==",t);
};
after the code of this.equals function. In the code of this.equals function one can by the way replace "==" to "===".
Morover one should modify the line 1359 from
to
It solved the problem.
Best regards
Oleg
11:38
Moderators
30/10/2007
Oleg,
Thanks. Fixed. Also I added isNull
https://github.com/tonytomov/jqGrid/commit/3e8b43a184cbaa12b82460fe359a2a7cf73c7641
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:04
10/08/2009
Hi Tony,
It seems to me that all construction from compareFnMap where not() are used ('nc', 'bn', 'en', 'ni') work incrrect with OR ('any') operation. Try for example in "fixed" the demo for
(Client "does not end with" 'F') OR (Client "does not end with" 'O')
or (Client "does not contain" 'F') OR (Client "does not contain" 'O').
It will executed as
(Client "does not end with" 'F') AND (Client "does not end with" 'O')
or as (Client "does not contain" 'F') AND (Client "does not contain" 'O') instead.
I am not sure that the order of operators in compareFnMap correct is or probebly one have to insert call of _resetNegate() somewhere. It can be that one should modify this.orNot and this.andNot to use
_negate=!_negate;
self._setCommand(self.and,f);
self._resetNegate();
return self;
};
or
_negate=!_negate;
self._setCommand(self.or,f);
self._resetNegate();
return self;
};
instead of current implementations. If can be that this.isNot function has the same problem with resetting of _negate. I don't tested all carefully enough.
What will be definetively work is including additional notContains, notStartsWith, notEndsWith functions like I made with notEquals.
Best regards
Oleg
14:03
Moderators
30/10/2007
Oleg,
The problem is that not() executes andNot(), without to care of the !== operator. i.e orNot() .. hum - will see how to fix.
Tahnks
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.
14:22
Moderators
30/10/2007
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.
20:52
10/08/2009
I could test the last changed in grid.base.js. Everything seems be fixed now.
On the other side the code of grid.filter.js has some small problems with selects build from dataUrl. If the select has no option with selected="selected" attribute the old plugin jquery.searchFilter.js shown just the first option as selected.
Try with the old style demo and the new filter demo. The old plugin worked without any problem with selects.
The new plugin looks different in FF and IE. In FF one see
and on IE and Chrome:
but after the click on the select box:
Moreover in many places of the code of grid.common.js one find code like
this.selected = ""
or
this.selected= "selected";
or
ov.selected ="selected";
where this or ov are DOM elements of the <option>. The selected property of the DOM element is boolean and readonly (see here for example) and not string. One should probably work with selectedIndex of parent <select> element.
In the example above one should probably set selectedIndex to 0 if it has -1 value after the initialization from dataUrl.
Best regards
Oleg
Most Users Ever Online: 715
Currently Online:
40 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