Thursday 7 March 2013

Git Understanding Image


How to trigger extjs combox on click of ENTER and TAB Key


Problem: I have one combobox, want to trigger the combobox on keypress of      ENTER and TAB key

Solution:  Use specialkey listener to handle ENTER and TAB key then you doQuery() method to trigger combobox.

 Version: EXTJS 4.1
Code:


   listeners: {
        specialKeyfunction(field,e) {
            if(e.getKey() === e.ENTER || e.getKey() === e.TAB){
             field.doQuery(field.getRawValue(),true,true)
            }
         }
    }