-
26 Mar 2008 12:22 PM #1
grid reconfigure() for plugins?
grid reconfigure() for plugins?
Just curious if it's possible to stuff a grid with different plugins at any point after having created it.
Of course I could always have an if-else in the code with two almost-identical grid declarations.
Tried Ext.apply (as below) but that didn't do anything.
Thanks!PHP Code:filters = new Ext.ux.grid.GridFilters({
...
});
p_grid = new Ext.grid.GridPanel({
...
});
if(mode == 'true'){
Ext.apply(p_grid, {
plugins: [filters]
});
}
-
26 Mar 2008 12:32 PM #2
At this time, it's not possible to apply a plugin after creation. All plugin setup is done in the constructor of the base Component. Technically, since all that's required for plugins to work is that the component pass a reference to itself via the plugin's init() method, you could do it manually like:
Code:var p = new MyPlugin(); p.init(myGrid);
-
26 Mar 2008 12:42 PM #3


Reply With Quote