베니94 2011. 7. 6. 10:31

// or an object with an Ext.data.Field ('dynamic') 
var fields = ['totally', {name : 'dynamic', type : 'string'}]; 
var newStore = new MyApp.store.Object({ 
  fields
: fields 
 
// other options like proxy, autoLoad... 
}); 

Don't specify a model property - it seems that it would override the fields property.

I also wanted to change the columns and content of an existing grid dynamically:

// reconfigure the grid to use the new store and other columns 
var newColumns = [ 
 
{header: 'Totally', dataIndex: 'totally'}, 
 
{header: 'Dynamic', dataIndex: 'dynamic'} 
]; 
myGrid
.reconfigure(newStore, newColumns);