Filter on multiple values

5 posts, 1 answers
  1. vlad
    vlad avatar
    21 posts
    Member since:
    Aug 2007

    Posted 16 Mar 2009 Link to this post

    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


  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 19 Mar 2009 Link to this post

    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.
  3. vlad
    vlad avatar
    21 posts
    Member since:
    Aug 2007

    Posted 19 Mar 2009 Link to this post

    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
  4. Answer
    Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 19 Mar 2009 Link to this post

    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.
  5. Igor
    Igor avatar
    2 posts
    Member since:
    Jan 2012

    Posted 27 Oct 2017 Link to this post

    Hi!

    Did you find solution?

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

Back to Top