1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    3
    Vote Rating
    0
    sviki89 is on a distinguished road

      0  

    Default Unanswered: Combobox Filtering based on Multiple Value selection

    Unanswered: Combobox Filtering based on Multiple Value selection


    There are three comboxes in which i select the first combox(Mandatory), based on selecting first combox it filters the second, after selecting second it filters based on first and second dynamically. It works fine for selecting single value. If i have multiselect option for this, filtering doesn't work for the other comboboxes. Please help me how to get the multiple values and how to filter it dynamically. Thanks in advance.

  2. #2
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,111
    Answers
    83
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    How did you filter? In what way do you filter the second combo after the first selection. Do you have a piece of code?

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    3
    Vote Rating
    0
    sviki89 is on a distinguished road

      0  

    Default


    Thanks for the reply. Her is the code i have used.

    onChange: function(combo, newValue, oldValue, eOpts) {
    var first= combo.getValue();
    Store.clearFilter();
    Store.filter('comboboxName', first);
    }

    Store is second combobox store that is to be filtered based on selecting first combo. I am getting first combo value and filtering second combobox based on first one. this is for single value selection. I need help for Multi value selection in filtering.

    Thanks in advance.

  4. #4
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,111
    Answers
    83
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    I presume the first combo is a mulitselect.

    Can you check what getValues() returns. Is it an Array? What's the value of first?

  5. #5
    Sencha User
    Join Date
    Sep 2012
    Posts
    3
    Vote Rating
    0
    sviki89 is on a distinguished road

      0  

    Default


    In first combobox after multi selecting the values. I am getting correct values in the console.
    Ex: ["One", "Two"] These are the values i have selected. I need to filter for the second combobox based on the value "one" and "two". Currently i am able to filter for single value selection. I need to filter based on these mulitple values. Could you please help me on filtering based on Array.

    Thanks in advance.

Thread Participants: 1