Features
The Ext.grid.feature.Feature
class is a new class included since Ext JS 4, and designed for being a type of plugin specific for the Grid panel. In older versions of the framework, plugins were the way of adding custom functionality to grids, but the Sencha team has created a more organized way of doing this.
With this class, we can inject additional functionality into certain points of the grid's creation cycle. Since Ext JS 4, we have four main classes that extend from the Ext.grid.feature.Feature
class, as covered in the following sections.
Ext.grid.feature.Grouping
This feature displays the grid rows in groups. The configuration has to be done in the grid with the feature property, and has to be done on the grid store as well.
First, we have to change our store a little, as shown in the following code:
Ext.define('Myapp.store.customers.Customers',{
extend:'Ext.data.Store',
model: 'Myapp.model.Customer',
groupField: 'country',
autoLoad:true,
proxy:{
type:'ajax',
url...