PDA

View Full Version : [editorgrid] hide editor on select



jeroenooms
15 Apr 2010, 12:28 PM
I use a combobox in an editorGridPanel to change values, similar to the 'light' column in this example (http://www.extjs.com/deploy/dev/examples/grid/edit-grid.html). However, I find it annoying that it requires 4 clicks to change a value.

I would like to hide the editor immediately when a value from the combox has been selected, i.e. during the 'select' event. However, I cannot find the method that hides the editor from the editorGridPanel.

edit: problem solved. For future reference: you can make a 4-click process into a minimal 2-click process, using these listeners for your combobox:


listeners: {
'select': function(){this.fireEvent('blur');},
'collapse': function(){this.fireEvent('blur');},
'focus': function(obj){obj.onTriggerClick();}
},


This is, imho, extremely useful for filling large grids.

mitchellsimoens
15 Apr 2010, 1:37 PM
have you tried stopEditing(true/false) on the editorgrid?