PDA

View Full Version : beforecomplete event not firing on combobox editor



shaleth
5 Nov 2013, 3:08 PM
I'm dynamically creating a grid, and for the life of me I can't get the "beforecomplete" event to fire.

Here's where I create the columns - am I doing something wrong?


stCols.push({
xtype: 'gridcolumn',
text: myText,
dataIndex: 'RESULT_' + record.data.SUBTEST_ID,
sortable: false,
hideable: false,
width: colWidth,
renderer: mySTRenderer,
editor: {
xtype: 'combobox',
store: editorStore,
valueField: 'abbr',
displayField: 'name',
triggerAction: 'all',
listeners : {
beforecomplete : function(field, newVal, oldVal) {
field.up('grid').fireEvent("gridCellChanging", field, newVal, oldVal);
}
}
}
});

I even tried just setting the function to simply alert, and the alert didn't fire. Any assistance welcome... Note that a "change" event *will* fire here, but I need to catch the changes before anything is written to the model.

Thanks,
Shaleth

shaleth
6 Nov 2013, 9:57 AM
I guess I was having a blond day, and I need to use events for the combobox. However, I can't seem to find one that allows me to get between changing the value on the screen and changing it in the model. Any suggestions for what I'm missing?

ettavolt
6 Nov 2013, 11:16 AM
You may be interested in validateedit (http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.grid.plugin.Editing-event-validateedit) event. (Note, it is fired not only on a plugin, but on a grid too)

shaleth
6 Nov 2013, 11:42 AM
Brilliant - thank you!!