oria / gridx

Just another powerful Dojo grid
Other
162 stars 78 forks source link

dynamic load of GridX Module to an existing declarative Gridx #112

Open randynwalsh opened 11 years ago

randynwalsh commented 11 years ago

Hi,

I'd like to add some of the Grid modules via javascript to an already setup Gridx.

Something like require(['dijit/registry', "dojo/dom"], function(registry, dom) { var myGridX = registry.byId("zGrid");

myGridX.modules.add(["gridx/modules/ColumnResizer", "gridx/modules/SingleSort"]) . . . })

but I don't see via the API how to do this. Can you help Me?

Many thanks,

Randy

p.s. You might ask why I want to do this. I am Maqetta to setup my basic page (which uses a declarative gridx setup). Maqetta setups and loads the grid.

yurychika commented 11 years ago

Gridx don't support adding modules in running time which meas modules can't be change after gridx is created.

I think you can destroy the gridx first, and then use your dynamic modules config to create a new grid.