PDA

View Full Version : Extending the grid panel



jugg1es
20 Jul 2012, 2:38 PM
I need to add some functionality to the grid panel and I'm not sure how best to do it. I need to modify how grouping is done in the grid panel, so should I extend Ext.grid.feature.Grouping? Should I create a plugin for the panel? Should I override the grid class? Any ideas would be helpful.

scottmartin
20 Jul 2012, 2:51 PM
Since this is related to the grouping feature, .. you should be able to simply extend Grouping



Ext.define('Ext.grid.feature.Grouping', {
extend: 'Ext.grid.feature.Feature',
..
});


Scott.

jugg1es
20 Jul 2012, 3:21 PM
But I looked at the source for Ext.grid.feature.Grouping and it doesn't have access to what I need, mainly sorting. I need to manually order the groups, i.e. I need to specify two specific groups that are pinned to the top of the list, but then the rest need to be sorted normally. Ext.grid.feature.Grouping doesn't look like it does anything to order the groups.

jugg1es
20 Jul 2012, 3:30 PM
I guess what I really need is to bypass the default sorting mechanism. Can I create a new sorter for the grid? or do I have to go deeper?

scottmartin
20 Jul 2012, 9:50 PM
This may be a requirement. I have not reviewed this code .. and not sure of all your requirements, but you should be able to proceed on your current path.

Scott.

jugg1es
20 Jul 2012, 9:56 PM
programming is hard