ExtJS Grid provides two ways to add functionality:
Plugins:. Plugins provide custom features for the component. ExtJS 4 introduced this system so that developers can implement their custom functions into the component. It is defined as an object or an array of an object using the plugins attribute of the grid class.
Basically, a plugin is an ExtJS class, which usually does not require an extension of any ExtJS class. The required part of the plugin class is that it MUST have an init method that the plugin system calls to initialize the plugin. This method should take a parameter (which will be a link to your grid). The init method is supposed to configure all user events (if any) or the connection method that listen for events.
Here is an example of skeletal code:
Ext.define('Ext.ux.grid.MyPlugin', { alias: 'plugin.ux.muplugin', init: function(grid) {
Features:. A function is a type of plugin that is available only for the grid panel. The base class for the function is Ext.grid.feature.Feature . You need to extend this class if you plan to create a function.
Here is an example:
Ext.define('Ext.grid.feature.MyFeature', { extend: 'Ext.grid.feature.Feature', alias: 'feature.myfeature',
This will help you get started.
source share