Thanks,
but I have no store field for the column.
This doesn't work correctly.
I tried some things and now my code is this:
Code:
Ext.override(Ext.grid.GridPanel, {
initComponent: Ext.grid.GridPanel.prototype.initComponent.createSequence(function() {
var col = new My.grid.Column();
// this function inserts the column to the defined index in colModel.config using colModel.setConfig function
this.colModel.insertColumn(col, 1);
})
});
This also doesn't work correctly, because the colModel.columns won't be updated.
This means the resulting colModel contains an array (length = 3) in columns index and an array (length = 4) in config index.
How do I update the colModel completely?