Results 1 to 2 of 2

Thread: ComboBox Select Listener

  1. #1

    Default ComboBox Select Listener

    I'm trying to add a select listener to a combo box like this:

    new Ext.form.ComboBox(
                typeAhead: true,
                mode: 'local',
                selectOnFocus: true,
                triggerAction: 'all',
                displayField: 'description',
                valueField: 'origin',
                store: Exs.Data.storeOrigins,
                    select: function (cmb, record, index)
                        alert("index: " + index);
    The listener function is invoked but the arguments passed to the listener function (cmb, record, index) are always undefined. I also tried using the addListener method with the same results. From the documentation I would expect those three arguments to be passed to my listener function:
    select  : ( Ext.form.ComboBox combo, record, Number index )
    So What is it I am doing wrong?

  2. #2
    Sencha User's Avatar
    Join Date
    Mar 2007
    DC Area =)


    it works for me:

    var combo = new Ext.form.ComboBox({
        store : ['1','2','3'],
        listeners : {
            select : function() {
    new Ext.Window({
        height : 100,
        width : 200,
        items : combo
    Oh, and you should google firebug. Developing with alerts is so inefficient

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts