Results 1 to 3 of 3

Thread: menu and grid

  1. #1
    Sencha User
    Join Date
    Mar 2007
    Location
    Tours, France
    Posts
    97

    Default menu and grid

    Hello
    In my grid I have a tbar like this :
    Code:
    tbar : [ new Ext.form.ComboBox({
    				fieldLabel: 'Zone géographique',
    				store: new Ext.data.SimpleStore({
    				fields: ['id', 'libelle'],
    				data : Ext.dataZoneGeoOffresSpeciales.Zone  // from states.js
    				}),
    				displayField:'libelle',
    				valueField: 'id',
    				id : 'zone',
    				hiddenName: 'IdZoneGeoOffresSpeciales', 
    				typeAhead: true,
    				labelStyle: 'width:170px;',
    				mode: 'local',
    				triggerAction: 'all',
    				emptyText:'Choisir...',
    				selectOnFocus:true,
    				forceSelection: true,
    				 width: 250,
    				allowBlank:false
    				}),{
                text:'Nouvelle offre spéciale',
                tooltip:'Ajouter une nouvelle offre spéciale',
                iconCls:'add',
    			handler: addCate
            }]
    I would like call a function when I select a value in may combobox, how can I do that ?
    Thanks

  2. #2
    Ext JS Premium Member dj's Avatar
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    573

    Default

    ComboBox has a change or select event that you want to subcribe to.

    add something like
    Code:
    listeners:{
      change:function(combo, ewVal, oldVal) {
        // do something
      }
    }
    to the config of your ComboBox.

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Location
    Tours, France
    Posts
    97

    Default

    thanks

Posting Permissions

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