webfriend13
22 Mar 2012, 12:40 AM
Hi All,
To assign a feature to grid we can create feature and assign it to grid using following code.
var groupingFeature = Ext.create (http://docs.sencha.com/ext-js/4-0/#%21/api/Ext-method-create)('Ext.grid.feature.Grouping (http://docs.sencha.com/ext-js/4-0/#%21/api/Ext.grid.feature.Grouping)', { groupHeaderTpl: 'Group: {name} ({rows.length})', //print the number of items in the group startCollapsed: true // start all groups collapsed});and in grid this is assigned to grid's feature config.How can we do the same via code at the run time ?Thanks in advance
To assign a feature to grid we can create feature and assign it to grid using following code.
var groupingFeature = Ext.create (http://docs.sencha.com/ext-js/4-0/#%21/api/Ext-method-create)('Ext.grid.feature.Grouping (http://docs.sencha.com/ext-js/4-0/#%21/api/Ext.grid.feature.Grouping)', { groupHeaderTpl: 'Group: {name} ({rows.length})', //print the number of items in the group startCollapsed: true // start all groups collapsed});and in grid this is assigned to grid's feature config.How can we do the same via code at the run time ?Thanks in advance