Forum


19:35

10/08/2009

Probably you have the problem described here. I would recommend you to read the answer, this one and this. If you have another problems you should post more code which shows how you use jqGrid and the frozen columns feature.
Best regards
Oleg
21:31

26/01/2012

Can't get it working - now with the grouping the "freezing" doesn't do anything at all. This is my code (with just part of the data):
<script type="text/javascript">
var mydata = [
{State:'Azerbaijan', cont:'Asia', '2009':'10100', '2008':'61600', '2007':'39200', '2006':'31900', '2005':'31800', '2004':'29500', '2003':'18600', '2002':'58', '2001':'57'},
{State:'Bosnia and Herzegovina', cont:'Europe', '2009':'96000', '2008':'123000', '2007':'121800', '2006':'136200', '2005':'131200', '2004':'121294', '2003':'112503', '2002':'102271', '2001':'95064'},
{State:'France', cont:'Europe', '2009':'345000', '2008':'389000', '2007':'427800', '2006':'442100', '2005':'437900', '2004':'446900', '2003':'444100', '2002':'463200', '2001':'713000', '2000':'701000', '1999':'694000'},
{State:'Germany', cont:'Europe', '2009':'291800', '2008':'605876', '2007':'551030', '2006':'515539', '2005':'647934', '2004':'667800', '2003':'660800', '2002':'652800', '2001':'651600', '2000':'643545', '1999':'633803'},
{State:'Greece', cont:'Europe', '2009':'134737', '2008':'162339', '2007':'167937', '2006':'164528', '2005':'165300', '2004':'166634', '2003':'167797', '2002':'165262', '2001':'163581', '2000':'167507', '1999':'170301'},
{State:'Iceland', cont:'Europe', '2009':'810000', '2008':'760000', '2007':'515000', '2006':'328424', '2005':'272400', '2004':'271300', '2003':'265900', '2002':'263528', '2001':'242526', '2000':'225721', '1999':'221433'},
{State:'Italy', cont:'Europe', '2009':'165800', '2008':'186400', '2007':'179500', '2006':'194200', '2005':'192900', '2004':'195400', '2003':'191400', '2002':'190400', '2001':'187400', '2000':'210000', '1999':'205567'},
{State:'Netherlands', cont:'Europe', '2009':'306000', '2008':'321200', '2007':'296900', '2006':'285300', '2005':'333800', '2004':'327000', '2003':'282800', '2002':'284400', '2001':'293200', '2000':'301700', '1999':'270000'},
{State:'Norway', cont:'Europe', '2009':'1125000', '2008':'1358800', '2007':'1362000', '2006':'1383000', '2005':'1391000', '2004':'1321700', '2003':'1192000', '2002':'1044000', '2001':'1100000', '2000':'1030000', '1999':'1000000'},
{State:'Poland', cont:'Europe', '2009':'10300', '2008':'29500', '2007':'57600', '2006':'55900', '2005':'53600', '2004':'58900', '2003':'57200', '2002':'58800', '2001':'45000', '2000':'45100', '1999':'46750'}
];
jQuery("#list").jqGrid({
height: 500,
width: 672,
rowNum: -1,
shrinkToFit:false,
datatype: 'local',
colNames:['State', 'cont','1999','2000','2001','2002','2003','2004','2005','2006','2007','2008','2009'],
colModel :[
{name:'State', index:'State', width:170, frozen:true},
{name:'cont', index:'cont'},
{name:'1999', index:'1999', width:80, align:'right', formatter:'integer', summaryType:'sum'},
{name:'2000', index:'2000', width:80, align:'right', formatter:'integer', summaryType:'sum'},
{name:'2001', index:'2001', width:80, align:'right', formatter:'integer', summaryType:'sum'},
{name:'2002', index:'2002', width:80, align:'right', formatter:'integer', summaryType:'sum'},
{name:'2003', index:'2003', width:80, align:'right', formatter:'integer', summaryType:'sum'},
{name:'2004', index:'2004', width:80, align:'right', formatter:'integer', summaryType:'sum'},
{name:'2005', index:'2005', width:80, align:'right', formatter:'integer', summaryType:'sum'},
{name:'2006', index:'2006', width:80, align:'right', formatter:'integer', summaryType:'sum'},
{name:'2007', index:'2007', width:80, align:'right', formatter:'integer', summaryType:'sum'},
{name:'2008', index:'2008', width:80, align:'right', formatter:'integer', summaryType:'sum'},
{name:'2009', index:'2009', width:80, align:'right', formatter:'integer', summaryType:'sum'}
],
sortname: 'State',
grouping:true,
groupingView : {
groupField : ['cont'],
groupSummary : [true],
groupColumnShow : [true],
groupText : ['<b>{0}</b>'],
groupCollapse : false,
groupOrder: ['asc']
},
});
for(var i=0;i<=mydata.length;i++)
jQuery("#list").jqGrid('addRowData',i+1,mydata[i]);
jQuery("#list").trigger("reloadGrid");
jQuery("#list").hideCol("cont");
jQuery("#list").jqGrid('setFrozenColumns');
</script>
22:20

10/08/2009

First of all you should read documentation including the list of limitations of the current implementation. It can save many time. Here you can find that grouping are not supported with frozen columns.
Best regards
Oleg
01:06

26/01/2012

Ok, thanks, didn't notice that grouping and frozen columns doesn't work together - will work it some way out.
Got another problem tho i didn't notice before - when i use the code above the last row wont display. It disapears when I call
jQuery("#list").trigger("reloadGrid");
And i have to use this because when without it only part of the rows get grouped.
Now i have a full grid with footer, scrolling and grouping nicely, just without the last row...
Most Users Ever Online: 715
Currently Online:
69 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