Reputation: 105
I am using the Extjs4.2.1 and I want to add the Extjs Button in the groupHeader of GroupingGrid.
for the reference please have a look http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.grid.feature.Grouping
Upvotes: 0
Views: 4890
Reputation: 1
I added like this and it worked:
features: [{
ftype: 'grouping',
groupHeaderTpl: 'Job Premium Id: {name} <button type="button" onclick="set()">Click Me!</button> {sampleButton}',
}],
Upvotes: 0
Reputation: 1
I added the html button in the groupHeaderTpl it worked fine.
features: [{ ftype: 'grouping', groupHeaderTpl: 'Click Me! {sampleButton}', }],
Upvotes: 0
Reputation: 1951
groupHeader can be formatted using groupHeaderTpl, and add groupclick listener to listen click events
Sample here: https://fiddle.sencha.com/#fiddle/1dq
Upvotes: 3
Reputation: 6420
Putting a real Ext button in the header would be hard... but you can add just about any html to the groupHeader via the groupHeaderTpl.
Upvotes: 0
Reputation: 1315
Refer to the EXT JS 4.2 examples by Sencha. Please refer below example.
http://docs.sencha.com/extjs/4.2.1/extjs-build/examples/grid/remote-group-summary-grid.html
Upvotes: -2