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
jqGrid 4.1.2 ignoreCase + multiGroup bug
10/08/2011
19:33
Avatar
A415Hz
Member
Members
Forum Posts: 12
Member Since:
20/10/2010
sp_UserOfflineSmall Offline

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

}

10/08/2011
19:47
Avatar
A415Hz
Member
Members
Forum Posts: 12
Member Since:
20/10/2010
sp_UserOfflineSmall Offline

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.

<script type="text/javascript">
$(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"}]}]}';
$("#grid").jqGrid('setGridParam', { search:true, postData: { "filters": filters_data} }); } }); this_grid.jqGrid ('navGrid', '#pager', {edit: false, add: false, del: false, refresh: true, view: false}, {}, {}, {}, {multipleSearch: true, multipleGroup:true, showQuery: true}); });
</script> <table id="grid"><tr><td/></tr></table> <div id="pager"></div>
14/08/2011
10:43
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

17/08/2011
21:14
Avatar
A415Hz
Member
Members
Forum Posts: 12
Member Since:
20/10/2010
sp_UserOfflineSmall Offline

Thank you very much for consideration and implementing the fix.

I will look forward to the next release.

16/12/2011
21:27
Avatar
stephenpatten
New Member
Members
Forum Posts: 1
Member Since:
16/12/2011
sp_UserOfflineSmall Offline

tony said:

Hello,

Thanks. Fixed in GitHub.

Best Regards

Tony


Hello Tony,

I just pulled down the code from GitHub and the grid does not filter correctly. I can provide a working example if you email me your address.

Regards,

Stephen

Forum Timezone: Europe/Sofia

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

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information