PDA

View Full Version : Add custom row after grid header



Romick
15 Feb 2012, 6:10 AM
Hi everyone!

I have a little problem. And cant find any solution for this. I need to add two row after grid header (thats column properties rows, some my custom columns types) and then should display all store data.

All what I have found :


,features: [
Ext.create('Ext.grid.feature.RowBody', {
getAdditionalData: function(data, rowIndex, record, orig) {
if (rowIndex == 0){
var headerCt = this.view.headerCt,
colspan = headerCt.getColumnCount();
return {
rowBody: "HELLO WORLD!", // do something with row (my col types)
rowBodyCls: this.rowBodyCls,
rowBodyColspan: colspan
};
} else {
return {
rowBody: '',
rowBodyCls: this.rowBodyCls,
rowBodyColspan: colspan
};
}
}
})
]

But it add row only after store row.
31724