Yes, you can. You can also generate your column configuration on the server.
Here can you see how you can do it:
Ext.define('mynamespace.Grid', {
extend: 'Ext.grid.Panel'
// ... your grid configuration
initComponent: function() {
var cm = [];
Ext.each(columnsArray, function(rec) {
var col = {
text: rec.name,
dataIndex: rec.dataIndex
// ... renderer and so on
};
cm.push(col);
}, this);
this.columns = {
items: cm
};
this.callParent(arguments);
}
});