This is a migrated thread and some comments may be shown as answers.

Filter on multiple values

4 Answers 256 Views
Grid
This is a migrated thread and some comments may be shown as answers.
vlad
Top achievements
Rank 1
vlad asked on 16 Mar 2009, 03:31 PM
Hi everybody,

I am trying to filter a column with multiple selected values.

I use <FilterTemplate> with custom RadComboBox (ComboBox + Checkbox for each line). For example, in column "Language", user can check & select "French" AND "German" in same time.

With the following code, I can easly filter for one language :

    protected void _Default_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) 
    { 
        GridFilteringItem filterItem = (GridFilteringItem)RadGrid1.MasterTableView.GetItems(GridItemType.FilteringItem)[0]; 
        ViewState["comboValue"] = e.Value; 
        (filterItem["Language"].Controls[1] as TextBox).Text = e.Value; 
        filterItem.FireCommandEvent("Filter"new Pair("EqualTo""Language")); 
    } 
 

But how can I manage to filter for more than one language ? If I retreive two selected values by user (French + German), how can I configure filterItem ?

Perhaps it is easy to do, but I'm just a novice in Telerik API, so help is really appreciated ...

Thank you


4 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 19 Mar 2009, 09:11 AM
Hi vlad,

To see more information on a possible option, please refer to the following example. The last column in the second grid contains a slider, which filters with a "between" option, which allows to be fired in one command, to include all the elements in a given range.
I hope this helps.

Greetings,
Yavor
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
vlad
Top achievements
Rank 1
answered on 19 Mar 2009, 10:31 AM
Hello Yarik,

Thank you for your answer. Unfortunately, I don't think this should work. I already quickly thought about using BETWEEN for filtering, but this make no sense, as application user has no reason to choose two consequent values.

If Languages range from 1 to 5, he can pick up 3,4,5 but also 1,5, in which case BETWEEN doesn't work.

I opened a support ticket 198675 concerning this issue.

Do you have any other ideas ?

Thank you
0
Accepted
Yavor
Telerik team
answered on 19 Mar 2009, 12:02 PM
Hi vlad,

To avoid duplicate posts, we can continue our communication in the support ticket that you have opened on the matter.

Regards,
Yavor
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Igor
Top achievements
Rank 1
answered on 27 Oct 2017, 01:59 PM

Hi!

Did you find solution?

It is possible to filter a column with multiple selected values?

Tags
Grid
Asked by
vlad
Top achievements
Rank 1
Answers by
Yavor
Telerik team
vlad
Top achievements
Rank 1
Igor
Top achievements
Rank 1
Share this question
or