Forum
19:33
20/10/2010
Hello,
I can now confirm that there is a bug that still exists after one fix made for this thread: http://www.trirand.com/blog/?p.....iplegroup/
The bug is that ignoreCase does not work when combined with "multiGroup" complex search.
The bug can be fixed by adding a line of code at line 1474:
if (group.rules !== undefined) { //line 1470
if(s>0) { //1471
var result = query.select(); //1472
query = $.jgrid.from( result); //1473
if (ts.p.ignoreCase) { query = query.ignoreCase(); } //add this code here, and fix will be made
}
19:47
20/10/2010
Ok here it is the test code I've prepared for 4.1.2.
If you could confirm it, I will appreciate it very much. I made it so that you can press "find" button from the search dialog window to see exactly what the search is trying to do!
The test code here is looking for data with last name either "smith" or "miller, AND it is looking for "john" (lower case). But, jqGrid returns no record, even if ignoreCase is true.
If you alter "john" to "John", it will return a record.
So, the one line fix that I mentioned previously, it can fix that.
Thank you for your consideration for the fix. And multiGroup complex search is such a great interface.
$(document).ready(function () {
var this_data = [
{id: "1", lname: "Smith", fname: "John"},
{id: "2", lname: "Smith", fname: "Jane"},
{id: "3", lname: "Smith", fname: "Mark"},
{id: "4", lname: "Smith", fname: "Sarah"},
{id: "5", lname: "Miller", fname: "Tom"},
{id: "6", lname: "Miller", fname: "Alison"},
{id: "7", lname: "Miller", fname: "Jack"},
{id: "8", lname: "Miller", fname: "Becky"}
],
this_grid = $("#grid");
this_grid.jqGrid({
datatype: 'local',
data: this_data,
colNames: ['Column1', 'Column2'],
colModel: [ {name: 'lname', index: 'lname', width: 200}, {name: 'fname', index: 'fname', width: 200} ],
rowNum: 10,
pager: '#pager',
gridview: true,
ignoreCase: true,
viewrecords: true,
gridComplete : function() {
filters_data = '{"groupOp":"AND","rules":[{"field":"fname","op":"eq","data":"john"}],"groups":[{"groupOp":"OR","groups":[],"rules":[{"field":"lname","op":"eq","data":"miller"},{"field":"lname","op":"eq","data":"smith"}]}]}';
</script> <table id="grid"><tr><td/></tr></table> <div id="pager"></div>
10:43
Moderators
30/10/2007
Hello,
Thanks. Fixed in GitHub.
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.
Most Users Ever Online: 715
Currently Online:
42 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