Results 1 to 2 of 2

Thread: Need Help Combo box ExtJS 3

  1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    1

    Default Need Help Combo box ExtJS 3

    hey guys, i really need your help..
    i have combo box with ds_bunga store looks like this:
    kasus.jpg


    table structure in Mysql looks like this:
    id | nama_bunga | harga_satuan
    , my question is how i can get "harga_satuan" value automatically into my "harga_satuan" field since i select "nama_bunga".
    my friend tell me tu use "listeners", i dont really understand the concept.
    this is my combo box code:
    Code:
     {
                    xtype: 'gridcolumn',
                    dataIndex:'nama_bunga',
                    selectOnFocus:true,
                    header: 'nama_bunga',
                    sortable: true,
                    width: 100,
                    editor: {
                        xtype: 'combo',
                        store:ds_bunga_faktur, 
                        displayField:'nama_bunga',
                        valueField:'nama_bunga',
                        triggerAction:'all', 
                        typeAhead:true,
                        mode:'local'
                    }
                },
    please help me guys

  2. #2
    Sencha User
    Join Date
    Sep 2010
    Location
    Netherlands
    Posts
    120

    Default

    Did you checked out the API? Link:

    sample code:

    Code:
    var cb = new Ext.form.ComboBox({    // all of your config options    listeners:{         scope: yourScope,         'select': yourFunsction    }});
    yourFunction can have 3 parameters (see API). Or you can use:

    Code:
    onSelect: function(record){            // do something with your record        }
    Good luck!

Tags for this Thread

Posting Permissions

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