PDA

View Full Version : Adding new column to model/store dynamically in the client



gwallace
13 Jun 2014, 5:37 AM
Has anyone had any experience with adding dynamic columns to models and stores? My use case is that we want to allow users to select two numeric columns and a math operation, create a new model with all the old fields and the new arithmetic column, combine the data of the old store with the new computed column, and reload the grid, all client side.

It sounds like it's going to be brutal, maybe even to the point where it might be generically unusable. Does anyone have any thoughts?

vardhan22
13 Jun 2014, 5:40 AM
Perhaps you want
http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.grid.Panel-method-reconfigure

The sample example is here..
http://docs.sencha.com/extjs/4.2.0/#!/example/build/KitchenSink/ext-theme-neptune/#reconfigure-grid

gwallace
13 Jun 2014, 5:56 AM
The reconfigure is one of the latter stages to this, but the dynamic store portion of this example isn't quite as complicated as my use case. However, between this and another thread I've seen, I might have enough to go on.