Results 1 to 2 of 2

Thread: Binding store filter to grid selection

  1. #1
    Sencha User
    Join Date
    Jan 2008
    Posts
    18

    Default Binding store filter to grid selection

    Hey there,

    in this fiddle https://fiddle.sencha.com/#view/editor&fiddle/2jmo I'm binding a filter of a store to a grid selection (see ViewModel.js).

    Problem: the filtered store isn't loaded on the first selection change. So if I select a row for the first time I see that the record formula has been bound to the selection (the Cars grid title is set correctly), but I see no request beeing sent to the server. On the second time it all works as expected. Any hints?

    Regards
    Igor

  2. #2
    Sencha User yeghikyan's Avatar
    Join Date
    Mar 2009
    Location
    München
    Posts
    574
    Answers
    99

    Default

    Code:
    stores: {
        people: {
            model: 'Fiddle.model.User',
            autoLoad: true,
            proxy: {
                type: 'ajax',
                url: 'People.json',
                reader: {
                    type: 'json'
                }
            }
        },
        cars: {
            model: 'Fiddle.model.Car',
            autoLoad: true, <--- Changes are here.
            remoteFilter: true,
            remoteSort: true,
            proxy: {
                type: 'ajax',
                url: 'Cars.json',
                reader: {
                    type: 'json'
                }
            },
            filters: [{
                property: 'owner_id',
                value: '{record.id}',
                operator: "==="
            }],
            sorters: [{
                property: "year",
                direction: "DESC"
            }]
        }
    }
    "The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague." – Edsger W. Dijkstra

Similar Threads

  1. binding store to list filter
    By ghilix in forum Ext 5: Q&A
    Replies: 2
    Last Post: 6 Jan 2016, 10:22 AM
  2. Replies: 9
    Last Post: 9 Dec 2015, 12:17 AM
  3. Grid binding store selection with extra parameters
    By brizardh in forum Ext 5: Q&A
    Replies: 2
    Last Post: 29 Oct 2014, 6:17 PM

Posting Permissions

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