Forum


15:25

08/03/2010

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:
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
20:08

Moderators
30/10/2007

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.
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66