-
24 Feb 2013 8:47 AM #1
Unanswered: jump to a record in a combobox using the keyboard
Unanswered: jump to a record in a combobox using the keyboard
Hello
I'm using a combobox. I want to know how I can jump to a certain record using the keyboard. i.e:
when opening the dropdown list, when I type "c" I'd like to jump to the records that start with "c".
I already know that the feature exists when the combobox is editable. However, I need to have mine non-editable, and still be able to "jump to" a certain letter.
Does anybody know how?
Thanks
-
24 Feb 2013 9:41 AM #2
Like this?
Code:Ext.create('Ext.form.field.ComboBox', { editable: false, enableKeyEvents: true, renderTo: Ext.getBody(), store: ['Volvo', 'Saab', 'Fiat', 'Audi'], listeners: { keyup: function(combo, event) { var key = String.fromCharCode(event.getKey()), boundList = combo.getPicker(), store = boundList.getStore(), record = store.findRecord(combo.displayField, key); if (record) { boundList.highlightItem(boundList.getNode(record)); } } } });
-
24 Feb 2013 10:32 AM #3
I'll try it
I'll try it
Thanks for your reply:-)
-
25 Feb 2013 5:12 AM #4
Thanks!
Thanks!
Works like charm!!!
B.t.w
I've been trying to use your extension to add a combo box in a cell inside a grid...but I couldn't
Where can I contact you in private?
Thanks
-
25 Feb 2013 6:45 AM #5
You could send me a PM on the forums.
Please make sure you've read the forum thread and the page on my website about the extension before you send me any questions directly.


Reply With Quote