-
4 Oct 2010 12:01 PM #1
EditorGrid + Combobox expansion in a single click
EditorGrid + Combobox expansion in a single click
Hello,
I have an editor grid with a combobox for one column. By default, it looks like in order to show the list of options in the combobox, a user has to click once to activate the editor and show the combobox, and then click again to open the combobox list so that they can select an option. I would like to have this only require a single click. My ideas are to:
a) show the combobox on mouseover for the cells
or
b) auto-expand the dropdown list when the user clicks a cell to show the combobox editor
I would prefer option (a), but are either of these possible? I have searched the forums a lot, and tried a few different ways of adding a listener to the combobox to call the expand() method after it is shown, but it did not work. Any other ideas?
-
5 Oct 2010 11:17 AM #2
By "did not work", I mean that either nothing happened, or the combobox did not get auto-expanded and I would get a javascript error when trying to expand it manually. I saw in another post that changing the expanded status manually like this can cause problems with its internal state.
-
6 Oct 2010 2:12 AM #3Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
For option b you could try:
Option a is not really possible. The only other solution is to show editor for all fields (see my EditableGrid user extension), but that should only be used on very small grids.Code:editor: new Ext.grid.GridEditor(new Ext.form.ComboBox({ ... }), { listeners: { startedit: function(){ this.field.expand(); } } })
-
6 Oct 2010 8:15 AM #4
Thanks for the reply. I tried your suggestion, but it didn't seem to change the behavior -- I click once to show the dropdown, then need to click a second time to expand the dropdown list. I'm using the IconCombo class too. Would there be any issues with this?
The following is what I have:
Code:editor: new Ext.grid.GridEditor( ... new Ext.ux.IconCombo({ forceSelection: true, triggerAction: 'all', lazyRender: true, mode: 'local', editable: false ... }), { listeners: { startedit: function(){ this.field.expand(); } } } )
Similar Threads
-
[Solved] Loading Combobox entries on new row in EditorGrid via click only
By tanepiper in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 16 Aug 2010, 3:20 PM -
both single click and double click get fired
By bhomass in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 30 Nov 2009, 6:39 PM -
single-click vs double-click dilemma
By junkzilla in forum Ext 2.x: Help & DiscussionReplies: 7Last Post: 9 Oct 2008, 9:07 AM -
Question on double click and single click event handlers within grid
By NotChris in forum Ext 2.x: Help & DiscussionReplies: 5Last Post: 27 Feb 2008, 11:51 AM -
Grid - Single click vs Double click select
By amackay11 in forum Ext 1.x: Help & DiscussionReplies: 13Last Post: 4 Jun 2007, 5:16 PM


Reply With Quote