PDA

View Full Version : how to add a tpl in the header of grid



mamkash
13 Aug 2013, 10:28 AM
Hi,

Can some one please help me in customizing the grid header. I would like to add few links in the header and perform some actions to that.

Any help is appreciated.

Thanks

mamkash
13 Aug 2013, 10:14 PM
I want to add a link in the column header of a grid. so want ot customize the column header with tpl.

aaugen
13 Aug 2013, 11:59 PM
Hi,

You can try extend Ext.grid.column.Column and work on renderTpl property like this:


renderTpl:
'<div id="{id}-titleEl" {tipMarkup}class="' + Ext.baseCSSPrefix + 'column header-inner">' +
'<span id="{id}-textEl" class="' + Ext.baseCSSPrefix + 'column-header-text">' +
'{text} <a href="www.something.com">something</a>' +
'</span>' +
'<tpl if="!menuDisabled">'+
'<div id="{id}-triggerEl" class="' + Ext.baseCSSPrefix + 'column-header-trigger"></div>'+
'</tpl>' +
'</div>' +
'{%this.renderContainer(out,values)%}',

mamkash
21 Aug 2013, 1:04 AM
Thanks a lot it worked.