PDA

View Full Version : Combobox Filtering based on Multiple Value selection



sviki89
14 Nov 2012, 2:16 AM
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.

tvanzoelen
14 Nov 2012, 4:37 AM
How did you filter? In what way do you filter the second combo after the first selection. Do you have a piece of code?

sviki89
14 Nov 2012, 7:16 AM
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.

tvanzoelen
14 Nov 2012, 7:28 AM
I presume the first combo is a mulitselect.

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

sviki89
14 Nov 2012, 8:51 AM
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.