Hi, i'm facing a problem with grid reconfigure (EXT 4.0.7). While reconfigure is executing, it hits this event:
Code:
onLastFocusChanged: function(oldFocused, newFocused, supressFocus) { if( this.views == undefined) return;
var views = this.views,
viewsLn = views.length,
store = this.store,
rowIdx,
i = 0;
I added the underline code fragment, without it the grid reconfigure throw an error (views is undefined). My grid is the following:
Code:
{ xtype: 'gridpanel',
title: 'Lista Allegati',
selType: 'rowmodel',
dockedItems: [{
xtype: 'toolbar',
dock: 'top',
items: [
{
xtype: 'button',
text: 'Aggiungi allegato',
handler: function () {
// Create a model instance
var r = Ext.create('GestioneDocumenti.Web.model.Allegato', {
});
this.up('grid').getStore().insert(0, r);
}
}
]
}],
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
})
],
columns: [
{
xtype: 'gridcolumn',
dataIndex: 'Id',
text: 'Id'
}, {
xtype: 'gridcolumn',
dataIndex: 'Path',
text: 'Path',
editor: 'textfield'
}, {
xtype: 'gridcolumn',
dataIndex: 'AllegatoKind',
text: 'AllegatoKind',
editor: 'textfield'
}
]
}
The code fragment that calls the reconfigure is the following.
var allegatiGrid = control.down('componentListAllegato').child();
allegatiGrid.reconfigure(modelInstance.Allegati());
modelInstance.Allegati() is a store generated by a model association.
Thank you