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_TopicIcon
Reset Search Value does not always work
19/08/2014
17:18
Avatar
houssem
New Member
Members
Forum Posts: 1
Member Since:
19/08/2014
sp_UserOfflineSmall Offline

Hello,

I'm using jqGird 4.6.0 with the filter toolbar and sortable columns enabled.
I put a filter value on a text type column, I drag that column into the place of a select type column, I click on Reset Search Value for my text, and it does not work.

Bug details. jquery.jqGrid.src.js line 4495:

$("td.ui-search-input select", ptr)[0].selectedIndex = 0;

There is no "selectedIndex" attribute for the selected element. This is because the element ($("td.ui-search-input select", ptr)[0]) is not of select type. That is because the index of the colModel (line 4491) still refers to the select type column instead of the text type column that was moved there.
The wrong column index is set on line 4488:

coli = parseInt($("td.ui-search-oper", ptr).attr('colindex'),10),

I don't have enough time to track why the colindex attribute on the DOM hasn't been updated when the column was reordered, so instead, I wrote a small fix that can be used to get the correct index independently from the field's colindex attribute. Replace line 4488 with:

coln = $("td.ui-search-input", ptr).attr('name'),
coli = null;
for (var i = 0; i < $t.p.colModel.length; i++) {
    if ($t.p.colModel[i].index === coln) {
        coli = i;
        break;
    }
}

This is the first bug report I do because it messes up some events on my code and it's not clean to fix without touching jqGrid's source. Sorry if I'm not respecting any standards in this forum; this is my first post and it's in a hurry.

Houssem.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
66 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