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.5.4 - Column Chooser Bug
20/12/2013
19:21
Avatar
pposgate
New Member
Members
Forum Posts: 1
Member Since:
20/12/2013
sp_UserOfflineSmall Offline

We found a bug with the "Column Chooser" feature in JQGrid 4.5.4.  This bug can be demonstrated in JQGrid's demo-page, under the "New in version 3.6″ section, in the "Column Chooser" example.  We are using Windows7, and repeated the bug while using IE8, IE9, IE10, IE11, and FF26. 

I will now explain the steps to repeat this bug using screenshots…

Step 1: Start with…

Image Enlarger

Step 2: Click the "Columns" button to open the Column Chooser…

Image Enlarger

Step 3: Click "Remove All"…

Image Enlarger

Step 4: Add the "Client" column back…

Image Enlarger

Step 5: Click the "Ok" button, and now you see the bug (eg: the grid doesn't show the "Client" column)…

Step 6: Moving along….   Click the "Column Chooser" button again….

Image Enlarger

Step 7: Add the "Client" column back….

Image Enlarger

Step 8: Click the "Ok" button again…. Now it works!

Image Enlarger

08/09/2014
22:17
Avatar
bkwdesign
Member
Members
Forum Posts: 3
Member Since:
08/09/2014
sp_UserOfflineSmall Offline

I have an implementation of jqGrid 4.5.4 and I have found this bug, too, independently of this thread. It is indeed peculiar. I just wanted to add my voice to this issue.

09/09/2014
16:55
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

I can confirm the bug. It's important to mention that the problem don't exist if one uses old versions of jQuery (for example 1.8.3) and old version of jQuery UI (for example 1.8.24). I prepared the demo which uses the old versions of jQuery and jQuery UI and it seems to work without any problems.

Then I get the last version of jQuery UI Multiselect plugin from github and made some small changes to use [selected] selector. I changed two lines of jqGrid code too to do the same. As the result the code seems to work for both new jQuery (1.11.1) and new jQuery UI (1.11.0): the new demo. It's important to remark that the demo which uses modified ui.multiselect.js and modified jqGrid works with old versions of jQuery (1.8.3) and jQuery UI (1.8.24).

The modification which I made in jqGrid was replacing the line

if (this.selected) {

to the line

if ($(this).is("[selected]")) {

and replacing the line

$('option:selected',select).each(function() { perm.push(parseInt(this.value,10)); });

to the line

$('option[selected]',select).each(function() { perm.push(parseInt(this.value,10)); });

 In the same way I modified the line 

var options = that.element.find('option').not(":selected");

of ui.multiselect.js to the following line

var options = that.element.find('option').not("[selected]");

and another lines 

var item = that._getOptionNode(this).appendTo(this.selected ? that.selectedList : that.availableList).show();

if (this.selected) that.count += 1;

to the lines

var isSelected = $(this).is("[selected]"),
    item = that._getOptionNode(this).appendTo(isSelected ? that.selectedList : that.availableList).show();

if (isSelected) that.count += 1;

One can get the modified version of ui.multiselect.js here.

Best regards
Oleg

13/09/2014
12:41
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

 

The good news is that I will change the code in jqGrid.

The bad news is  that it is unknown if this will be fixed in multi-select plugin.

 

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:
22 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