Forum


22:54

12/06/2012

hughxie said:
hi,
I having trouble freezing columns when 'rownumbers: true'. Only column headers are frozen, not data. Currently, the only way is turning off rownumbers. Not sure if this is a bug. If yes, is there a work around?
Thanks in advance.
Just want to provide more info. it seems work after I sort one of the column. Any way do this without sorting? Here is my code:
myGrid.jqGrid({
data: mydata,
datatype: 'local',
colModel: [{name:'NAMESPACE', index:'NAMESPACE', width:130,frozen:true},
{name:'SOURCE', index:'SOURCE', width:130,frozen:true},
{name:'NAME', index:'NAME', width:130,frozen:true},
{name:'EXPECTED_ARRIVAL', index:'EXPECTED_ARRIVAL', width:130,formatter:'date', formatoptions:{ srcformat:'Y-m-d H:i:s', newformat:'Y-m-d h:i A', defaultValue: '-' }, sorttype: "date", datefmt: 'Y-m-d h:i A'},
{name:'REGISTRATION', index:'REGISTRATION', width:130,cellattr: function(rowId, tv, rawObject, cm, rdata) {
return colorCode(rawObject.REGISTRATION_STATUS);
},formatter:'date', formatoptions:{ srcformat:'Y-m-d H:i:s', newformat:'Y-m-d h:i A', defaultValue: '-' }, sorttype: "date", datefmt: 'Y-m-d h:i A'},
{name:'ETL_STARTED', index:'ETL_STARTED', width:130,formatter:'date', formatoptions:{ srcformat:'Y-m-d H:i:s', newformat:'Y-m-d h:i A', defaultValue: '-' }, sorttype: "date", datefmt: 'Y-m-d h:i A'},
...]
viewrecords: true,
rownumbers: true,
sortorder: "desc",
height: 500,
scrollOffset: 0,
pager: '#pager',
rowNum:200,
rowList:[200,400],
caption: "Zinc Feeds Status for COB Date 2012-06-11 (PROD)"
});
jQuery("#list").jqGrid('setFrozenColumns');
16:22

12/06/2012

hughxie said:
hughxie said:
hi,
I having trouble freezing columns when 'rownumbers: true'. Only column headers are frozen, not data. Currently, the only way is turning off rownumbers. Not sure if this is a bug. If yes, is there a work around?
Thanks in advance.
Just want to provide more info. it seems work after I sort one of the column. Any way do this without sorting? Here is my code:
myGrid.jqGrid({
data: mydata,
datatype: 'local',
colModel: [{name:'NAMESPACE', index:'NAMESPACE', width:130,frozen:true},
{name:'SOURCE', index:'SOURCE', width:130,frozen:true},
{name:'NAME', index:'NAME', width:130,frozen:true},
{name:'EXPECTED_ARRIVAL', index:'EXPECTED_ARRIVAL', width:130,formatter:'date', formatoptions:{ srcformat:'Y-m-d H:i:s', newformat:'Y-m-d h:i A', defaultValue: '-' }, sorttype: "date", datefmt: 'Y-m-d h:i A'},
{name:'REGISTRATION', index:'REGISTRATION', width:130,cellattr: function(rowId, tv, rawObject, cm, rdata) {
return colorCode(rawObject.REGISTRATION_STATUS);
},formatter:'date', formatoptions:{ srcformat:'Y-m-d H:i:s', newformat:'Y-m-d h:i A', defaultValue: '-' }, sorttype: "date", datefmt: 'Y-m-d h:i A'},
{name:'ETL_STARTED', index:'ETL_STARTED', width:130,formatter:'date', formatoptions:{ srcformat:'Y-m-d H:i:s', newformat:'Y-m-d h:i A', defaultValue: '-' }, sorttype: "date", datefmt: 'Y-m-d h:i A'},
...]
viewrecords: true,
rownumbers: true,
sortorder: "desc",
height: 500,
scrollOffset: 0,
pager: '#pager',
rowNum:200,
rowList:[200,400],
caption: "Zinc Feeds Status for COB Date 2012-06-11 (PROD)"
});
jQuery("#list").jqGrid('setFrozenColumns');
add reloadGrid seems to resolve the issue:
myGrid.trigger('reloadGrid');
Most Users Ever Online: 715
Currently Online:
160 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