Extjs gridpanel dynamically sets the header, using the reconfigure Method
VaR Col = "([{text: 'company', flex: 1, sortable: false, dataindex: 'company'}, {text: 'stock price', columns: [{text: 'price', width: 75, sortable: True, dataindex: 'price'}, {text: 'change', width: 75, sortable: True, dataindex: 'change'}, {text: '% change', width: 75, sortable: True, dataindex: 'pctchang'}]}, {text: 'Last updated', width: 85, sortable: True, dataindex: 'lastchange'}]) ";
VaR Cols = eval (COL );
// Ext. findcmp ('testgrid', This). Columns. Add (Cols );
// Var grid = ext. getcmp ('testgrid'); // Ext. findcmp ('testgrid', This). columns;
Ext. findcmp ('testgrid', This). reconfigure (null, cols );
// Findcmp is a custom Method for Finding the control id based on the class ID
The following describes the extjs API
Reconfigure ([Ext. Data. Store store], [object [] Columns])
Reconfigures the table with a new store/columns. Either the store or the columns can be ommitted if you don't wish to change them.
Parameters