Need help on combo box selection

By wktd | March 16, 2010

  • Hi, guys,

    Sorry about the rookie question. I have a combo box, after I make a selection (e.g. use the combo box sample, I select Alabama state), I need to check something on the selection.

    I am not sure how I should do it. Should I add a 'blur' event and its handle on the combo box so that once selection is made, blur handler gets called?

    Thanks for any suggestions.

    George


  • Hi George-

    Please see the documentation for ComboBox (http://extjs.com/deploy/dev/docs/?class=Ext.form.ComboBox). The 'select' event should be what you are looking for. eg:

    var cb = new Ext.form.ComboBox({
    // all of your config options
    listeners:{
    scope: yourScope,
    'select': yourFunction
    }
    });


    Alternatively, you can assign events after the object is created:


    var cb = new Ext.form.ComboBox(yourOptions);
    cb.on('select', yourFunction, yourScope);


    Hope this helps-
    Mark







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Need help on combo box selection , Please add it free.

    Topics: enart.zjbr.com | edit

    ComboBox Cannot Be Modified Once Item Selected Multiple combobox Issue