Results 1 to 4 of 4

Thread: Data Binding based on Selected record in store

  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    18
    Vote Rating
    0
      0  

    Post Data Binding based on Selected record in store

    Hi everyone!!

    I have two grids getting data in my Div.

    In one of my grid I am displaying data from my Force.com.

    when I select a record in this grid, it should populate it's related records of another object(Another Store) in second grid.

    I have seen data-binding examples in Sencha. But dint get an example of how to do it with stores.

    Please get me at earliest..


    Thanx in advance..

  2. #2
    Sencha Premium User twaindev's Avatar
    Join Date
    Sep 2009
    Posts
    224
    Answers
    15
    Vote Rating
    7
      0  

    Default

    Bind both stores to the grids. Listen for the 'select' event of the first grid and use the passed in record to filter the store of the second grid.

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    18
    Vote Rating
    0
      0  

    Default

    I know that it should be done on Select Event...

    But, I want an perfect Example to display data based in second grid based on first grid record selection...

    Can you just give me or else guide me for this..

    I am getting selected value with cellclick listener. But I want to display different data based upon the value selected in first grid.

  4. #4
    Sencha Premium User twaindev's Avatar
    Join Date
    Sep 2009
    Posts
    224
    Answers
    15
    Vote Rating
    7
      0  

    Default

    I thought this was enough guidance.

    Just do something like this:

    Code:
    onGrid1Select: function(sm, record, index, opts) {
       store2.filter('orderId', record.get('id'));
    }

Posting Permissions

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