Filtering a custom column with a dropdown

5 posts, 0 answers
  1. Dave
    Dave avatar
    1 posts
    Member since:
    Oct 2012

    Posted 08 May 2013 Link to this post

    Hi Support,

    I have a grid in which I've implemented a custom multi select combo box column which inherits from GridViewComboBoxColumn. The row data for the grid is a business object which contains a list of values which are then mapped as individual column in the grid (satisfying the customer need to be able to create their own fields). The underlying data for my ComboBoxColumn is a list of values. I've implemented a multi-select dropdown which allows the user to select multiple values via checkboxes. The Value property is overridden to show the values in the list as a simple string. The image below shows this:

    What I now want to be able do is to filter on the values. "Show me the rows there 'WILSON' appears". Sounds too easy...

    The filter options available are No Filter, Null, Not Null and Custom. When I bash together a test project with a ComboBoxColumn I get the full suite of filters. What happened to them for my custom column?

    If there was the 'Contains' filter option that I hoped for I'm not sure that it will work properly anyway. The underlying data is a list, not a  single value, so I'm not sure how the filtering would be applied.

    I tried using the Excel filtering type (by implementing IGridFilterPopup) but I encountered some errors relating to comparing elements in the list.

    I was hoping for some advice/tips on the best way to implement this kind of filter?

  2. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 08 May 2013 Link to this post

    Hello Dave,

    Maybe you can provide a short example to demonstrate this issue, so that i can better help you with this?

    Emanuel Varga
  3. DevCraft R3 2016 release webinar banner
  4. Peter
    Peter avatar
    1148 posts

    Posted 13 May 2013 Link to this post

    Hello David,

    Thank you for writing.

    The MultiSelectDropDown column inherits from GridViewComboBoxColum and by default there are only No Filter, Null, Not Null and Custom filter options because the underlying source as you mentioned is a list and you cannot customize these items.

    As a workaround I would like to suggest to use a custom filtering in order to achieve your scenario. You can handle the CellValidating event in order to get the selected values from the filtering cell editor, CellEndEdit to force the custom filtering and implement the CustomFiltering with your own logic.

    Please, refer to the modified project that demonstrates this.

    All the best,
    the Telerik team
    RadChart for WinForms is obsolete. Now what?
  5. Denius
    Denius avatar
    8 posts
    Member since:
    Oct 2015

    Posted 06 Sep in reply to Peter Link to this post

    how to select second row on popup filtering dropdown by default?


    example i have : Name, MidName, Last name...

    i want select by default MidName?


  6. Dess
    Dess avatar
    1561 posts

    Posted 08 Sep Link to this post

    Hello Goran,

    Thank you for writing.  

    I would like to note that Telerik UI for WinForms suite now offers RadCheckedDropDownList which can be used as an editor in RadGridView. Additional information is available here:

    Thus, you don't need to use the custom column anymore. Could you please give us more details about the exact requirement that you are trying to achieve? A sample screenshot would be greatly appreciated. Thank you in advance.

    I am looking forward to your reply.

    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
Back to Top
DevCraft R3 2016 release webinar banner