PDA

View Full Version : Error on setSize if cellediting active



nothing
22 May 2013, 5:00 AM
My gridpanel has a store and uses the cellediting plugin.

When I reload my grid via loadData(), I also reconfigure() my grid's columns and call my model's setFields().

So while this is happening, click a editable grid cell in this gird by simple clicking it, and then an error gets thrown:



Uncaught TypeError: Cannot call method 'setSize' of undefined Editor.js:48
Ext.define.calculate Editor.js:48
Ext.define.runLayout Context.js:1154
Ext.define.runCycle Context.js:1123
Ext.define.run Context.js:1054
Ext.define.statics.flushLayouts AbstractComponent.js:84
Ext.define.statics.resumeLayouts AbstractComponent.js:100
Ext.resumeLayouts AbstractComponent.js:3437
Ext.define.reconfigure Table.js:1024
Ext.define.loadGrid Timesegments.js:53
oCallbacks.success Timesegments.js:25
oOptions.success HttpApiClient.js:378
Ext.apply.callback ext-dev.js:10913
Ext.define.onComplete Connection.js:872
Ext.define.onStateChange Connection.js:820
(anonymous function) ext-dev.js:2923


I tried preventing it by completing the edit process with:


if ( oView.editingPlugin )
{
oView.editingPlugin.completeEdit();
}

but this fails.

How can this be solved?

slemmon
24 May 2013, 8:32 AM
Are you doing the completeEdit in a beforeitemclick / mousedown listener? Also, to clarify, it's the action of attempting to edit the cell during the load/reconfigure that causes the issue?

nothing
25 Jun 2013, 1:53 AM
Yes it is during load/configure.

Currently I solve it by .commit() all the records and .completeEdit() the plugin.

Is there a better way?

slemmon
25 Jun 2013, 3:06 PM
Can you mask the grid view while the store is reloading / reconfiguring so that the user can't begin an edit while a load from the server is in progress?
grid.getView().getEl().mask()