1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    131
    Answers
    1
    Vote Rating
    1
    shaoen01 is on a distinguished road

      0  

    Default Unanswered: Update Other Fields via Combobox selection?

    Unanswered: Update Other Fields via Combobox selection?


    Hi All,

    I am using a grid (using store1) with a combo box using store2. I would like to simulate such that when a user selects value1 in the combo box, the other fields in the row gets populated with information. Is it possible to initiate a postback on selection of combo box value and populate the rest of the fields?

  2. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,064
    Answers
    110
    Vote Rating
    92
    Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light Farish is a glorious beacon of light

      0  

    Default


    you can use the select event of the combobox:

    Code:
    {
      xtype: 'combo',
      store: store2,
      listeners:
      {
        select: function(combo, records, eOpts)  // records is an array of selected record
        {
           // determine value1, value2 based on records
           store1.getAt(index of selected record).set({field1: value1, field2: value2});
        }
      }
    }

  3. #3
    Sencha User
    Join Date
    Jun 2011
    Posts
    131
    Answers
    1
    Vote Rating
    1
    shaoen01 is on a distinguished road

      0  

    Default


    Quote Originally Posted by Farish View Post
    you can use the select event of the combobox:

    Code:
    {
      xtype: 'combo',
      store: store2,
      listeners:
      {
        select: function(combo, records, eOpts)  // records is an array of selected record
        {
           // determine value1, value2 based on records
           store1.getAt(index of selected record).set({field1: value1, field2: value2});
        }
      }
    }
    Farish:
    How do i do a postback to get the record based on the combo box selection? I would probably need to go back to database. Or should i use another store to store all the information and filter out the information?

    store1.getAt(index of selected record) - Is it possible to filter the results in another store with the selected value from the combo box and retrieve the record?

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar