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
Problems with hidden columns in Column Chooser plugin
08/03/2010
15:25
Avatar
beden
Member
Members
Forum Posts: 3
Member Since:
08/03/2010
sp_UserOfflineSmall Offline

Hi!

I have a problem with hidden columns while using Column Chooser plugin. Everything works fine until there is an hidden column that is not the last column. (The example at http://www.trirand.com/blog/jq.....qgrid.html works fine, because the hidden column is at the end.)

In my case the hidden columns are spread all over the grid.

This bug only occurs in IE 7 + 8, not in Firefox 3+.

Here's my code:

jQuery("#colch").jqGrid({
        datatype: "local",
        colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'],
        colModel:[
                {name:'id',index:'id', width:55},
                {name:'invdate',index:'invdate', width:90, hidden:true},
                {name:'name',index:'name asc, invdate', width:100},
                {name:'amount',index:'amount', width:80, align:"right"},
                {name:'tax',index:'tax', width:80, align:"right"},
                {name:'total',index:'total', width:80,align:"right"},
                {name:'note',index:'note', width:150, sortable:false, hidden:true}
        ],
        rowNum:10,
        width:700,
        rowList:[10,20,30],
        pager: '#pcolch',
        sortname: 'invdate',
        shrinkToFit :false,
        viewrecords: true,
        sortorder: "desc",
        caption:"Column Chooser Example"
});
jQuery("#colch").jqGrid('navGrid','#pcolch',{add:false,edit:false,del:false,search:false,refresh:false});
jQuery("#colch").jqGrid('navButtonAdd','#pcolch',{ caption: "Columns", title: "Reorder Columns", onClickButton : function (){
                jQuery("#colch").jqGrid('columnChooser');
} });

var mydata = [
                        {id:"12345",invdate:"2007-12-03",name:"Desktop Computer",amount:"3",tax:"2",total:"5", note:"2007-12-03"},
                        {id:"23456",invdate:"2007-12-03",name:"Laptop",amount:"3",tax:"2",total:"5",note:"2007-12-03"},
                        {id:"34567",invdate:"2007-12-03",name:"LCD Monitor",amount:"3",tax:"2",total:"5",note:"2007-12-03"},
                        {id:"45678",invdate:"2007-12-03",name:"Speakers",amount:"3",tax:"2",total:"5",note:"2007-12-03"},
                        {id:"56789",invdate:"2007-12-03",name:"Laser Printer",amount:"3",tax:"2",total:"5",note:"2007-12-03"},
                        {id:"67890",invdate:"2007-12-03",name:"Play Station",amount:"3",tax:"2", total:"5",note:"2007-12-03"},
                        {id:"76543",invdate:"2007-12-03",name:"Mobile Telephone",amount:"3",tax:"2",total:"5",note:"2007-12-03"},
                        {id:"87654",invdate:"2007-12-03",name:"Server",amount:"3",tax:"2",total:"5",note:"2007-12-03"},
                        {id:"98765",invdate:"2007-12-03",name:"Matrix Printer",amount:"3",tax:"2", total:"5",note:"2007-12-03"}
                ];
for(var i=0;i<=mydata.length;i++)
        $("#colch").addRowData(i+1,mydata[i]);

Try to reorder the visible columns in the Column Chooser dialog. You will see, that it's not working and some columns get lost during the attemp (and some are dublicated).

I'm using jqGrid 3.6.4, jquery 1.3.2, jquery ui 1.7.2 and the newest version of the multiselect plugin.

Am I missing something or is it really a bug?

Regards,

Benjamin

09/03/2010
20:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thank you. The bug is already fixed:

http://github.com/tonytomov/jq.....fb6af1f385

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.

10/03/2010
09:11
Avatar
beden
Member
Members
Forum Posts: 3
Member Since:
08/03/2010
sp_UserOfflineSmall Offline

Thanks Tony,

you've saved my day!

BTW: You are doing really great work. jqGrid rocks!

Regards,

Benjamin

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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