PDA

View Full Version : Ext 3.1.1 - Problem with ColumnHeaderGroup Plugin



quen567
13 Oct 2010, 12:48 AM
Hi everyone,

I am trying to use the ColumnHeaderGroup Plugin on a Grid in our Application.
Sadly the extra Headers do not appear above the usual Columns and I have no Idea why not. There are no Error Messages or anything that could help me figure out why this won't work.

Here is my Code Example:


SalesTotalGrid = Ext.extend(Ext.grid.GridPanel, {

loadMask:true,
stripeRows: true,

columns: [
{ header: "Anm.", dataIndex: 'anm' },
{ header: "Anf.", dataIndex: 'anf' },
{ header: "Tel.", dataIndex: 'tel' }
],


monthGroupRow: [
{header: 'Januar', colspan: 3, align: 'center'},
{header: 'Februar', colspan: 3, align: 'center'},
{header: 'März', colspan: 3, align: 'center'},
{header: 'April', colspan: 3, align: 'center'},
{header: 'Mai', colspan: 3, align: 'center'},
{header: 'Juni', colspan: 3, align: 'center'},
{header: 'Juli', colspan: 3, align: 'center'},
{header: 'August', colspan: 3, align: 'center'},
{header: 'September', colspan: 3, align: 'center'},
{header: 'Oktober', colspan: 3, align: 'center'},
{header: 'November', colspan: 3, align: 'center'},
{header: 'Dezember', colspan: 3, align: 'center'}
],


initComponent : function() {

var group = new Ext.ux.grid.ColumnHeaderGroup({
rows: this.monthGroupRow
});

Ext.apply(this, {
sortable: true,
columns: this.columns,
viewConfig: {
forceFit: true
},
plugins: group
});
this.store = new SalesTotalStore();


SalesTotalGrid.superclass.initComponent.call(this);
}
});
Ext.reg("SalesTotalGrid",SalesTotalGrid);The Store is an GroupingStore.

Any Ideas on what I missed?

quen567
13 Oct 2010, 1:33 AM
I found my mistake.
Problem Solved. Thanky anyway.

psmacarov
13 Oct 2010, 1:37 AM
try to do this:
you implement 3 columns,
try to implement 12*3 = 36 columns

Condor
13 Oct 2010, 1:42 AM
Your columns don't match your groups. You should have 12x3=36 columns, but you only have 3!