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,084
    Answers
    112
    Vote Rating
    95
    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

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi