Results 1 to 8 of 8

Thread: How to sort binded store obtained through association

  1. #1
    Sencha Premium User
    Join Date
    Oct 2016
    Posts
    26
    Answers
    1

    Default Answered: How to sort binded store obtained through association

    hi,
    i'm following this extjs example
    http://examples.sencha.com/extjs/6.6.0/examples/kitchensink/?classic#row-widget-grid

    How can i set sorters for the binded store {record.orders} ?

  2. is there any update on this ?

  3. #2
    Sencha - Forum Administrator
    Join Date
    Sep 2017
    Posts
    1,005
    Answers
    5

    Default

    Hello- I have shared this with the support team and they will get back with you soon with assistance. Thank you for your patience!

    Michele

  4. #3
    Sencha Premium User
    Join Date
    Oct 2016
    Posts
    26
    Answers
    1

    Default

    is there any update on this ?

  5. #4
    Ext Support Team
    Join Date
    Jan 2018
    Posts
    569
    Answers
    7

    Default

    Hello Mattia,

    In the KitchenSink example we are using simulated response(Ext.ux.ajax.SimMananger) but in real world you will get data like shown in fiddle, where you can use sorters property like shown in fiddle below


    https://fiddle.sencha.com/#view/editor&fiddle/25o8

    Regards,
    Kumar
    Sencha Support.

  6. #5
    Sencha Premium User
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258
    Answers
    759

    Default

    The problem with your response is that it's not using associations at all. "record.contacts" is just a flat array.

    Bet you're glad you waited almost 3 months for this.

    Here's something that might set you on the right track:

    https://fiddle.sencha.com/#view/editor&fiddle/2p86

  7. #6
    Sencha Premium User
    Join Date
    Oct 2016
    Posts
    26
    Answers
    1

    Default

    maybe i did not explained enough my real problem...how can i sort the associated store ?
    my first store (let's call it "A") it's sorted when is loaded...but i'm not finding a way to apply sorters on associated data which i'm obtaining through binding

  8. #7
    Sencha Premium User
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258
    Answers
    759

    Default

    Not really clear on what you're asking. Taking my fiddle as a base, why doesn't it work like you want?

  9. #8
    Sencha Premium User
    Join Date
    Oct 2016
    Posts
    26
    Answers
    1

    Default

    Quote Originally Posted by evant View Post
    Not really clear on what you're asking. Taking my fiddle as a base, why doesn't it work like you want?
    thanks...the solution seems to be

    Code:
    rowViewModel: {                stores: {
                        orders: {
                            type: 'chained',
                            source: '{record.orders}',
                            sorters: 'productCode'
                        }
                    }
                },
    which is not really well documented

Similar Threads

  1. Load binded store
    By Lefree in forum Ext JS 6.x Q&A
    Replies: 1
    Last Post: 18 Dec 2017, 9:23 PM
  2. Mask grid on loading a binded association store
    By evandropoa in forum Ext JS 6.x Q&A
    Replies: 3
    Last Post: 12 Dec 2017, 1:16 AM
  3. Store onLoad trigerring before store being binded on Grid
    By CrazyMenConnected in forum Ext JS 6.x Q&A
    Replies: 0
    Last Post: 16 May 2017, 1:20 AM
  4. Binded store not working
    By joanpujol in forum Sencha Ext JS Q&A
    Replies: 4
    Last Post: 20 Mar 2015, 1:08 PM
  5. [OPEN] Combobox with initially store and binded store with filters
    By Hacker-CB in forum Ext 5: Bugs
    Replies: 1
    Last Post: 5 Sep 2014, 4:47 AM

Posting Permissions

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