View Full Version : Creating feature for gird at the run time

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

22 Mar 2012, 5:10 AM
What do you mean "do the same via code at the run time"? Do you mean you want to set a grid feature to the grid when the grid has already rendered?