PDA

View Full Version : Displaying Header inside grouping grid row



shoaib_D
18 Jul 2013, 10:44 PM
how to display header in row using Grouping Grid
i have a xml data and i m displaying it in Grouping Grid and have also added row expand and collapse to each row that are being fletch from xml but now i want to show header in each row so that it can be read easily

Thanks,

tvanzoelen
19 Jul 2013, 1:23 AM
You could take a look at the groupHeaderTpl property

http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.grid.feature.Grouping



groupHeaderTpl: Ext.create('Ext.XTemplate',
'Group: ',
'<div>{name:this.formatName}</div>',
{
formatName: function(name) {
return Ext.String.trim(name);
}
}
)


And change the function in a way it returns your header data.

shoaib_D
21 Jul 2013, 8:49 PM
hey thanks for the reply but that's not what i want. I am able to display the header for the grouping grid. what I want is when we expand the row we get a list and to that list i have further add a rowexpander plugins now I want to add a header inside each expanded row.
I wanted to show the image but image is not getting upload..
Thanks

slemmon
23 Jul 2013, 9:51 AM
The expanded row lets you set up your own HTML or XTemplate:
*Undocumented, but there is a bug ticket in the tracker to get the documentation updated: rowBodyTpl

In the rowbody template you can set any HTML you'd like including a header of some variety.