Results 1 to 3 of 3

Thread: Store filtering for combobox and bindStore.

  1. #1
    Sencha User
    Join Date
    Oct 2014
    Posts
    12

    Default Store filtering for combobox and bindStore.

    The store is bonded to the combobox with bindStore in a separate function.


    It all works fine - except that i need to filter the data in that function based of the given parameters.
    Code:
          loadMarkers: function(store, value){
        
            store.filter('resellerid',17);
        
            this.fields.marker.bindStore(store);
            this.fields.marker.getStore().filter('id',17);
            this.fields.marker.setValue(value);
          }
    This specific example has two diff ways iv tried it - before binding and after. Console.log at the end shows filtered store for both 'store' and even the combobox. But the combobox itself still shows everything.


    I even set the (on combobox config)


    Code:
        lastQuery: ''
    And it had no effect.

  2. #2
    Sencha Premium User
    Join Date
    Nov 2014
    Location
    Kansas
    Posts
    781

    Default

    It does not seem to play nicely when using the bindStore method. Can you adjust your logic so that the store is provided to the combo when the combo is created? The filtering (post load of the store) is working correctly with that approach.

    Regards,
    Brian


  3. #3
    Sencha User
    Join Date
    Oct 2014
    Posts
    12

    Default

    I end up cloning the filtered store and then binding it.I couldn't use listener - the store had to be loaded once with main grid load. And then the combobox populated based of the parameters from rowselect - without having to re-request the store over ajax each time. The id parameter (17) would have been a variable in real situation.

Tags for this Thread

Posting Permissions

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