Custom filter of column bound to custom object

2 posts, 1 answers
  1. Laurian Angelescu
    Laurian Angelescu avatar
    10 posts
    Member since:
    Apr 2010

    Posted 26 May 2010 Link to this post

    Several columns in my gridView are bound to custom objects and use converters to convert an enum into a displayable value. Imagine this scenario:

    class CustomObject  
        EnumPropertyType Property;  
        [other members]  
    enum EnumPropertyType  
       VALUE1, VALUE2, VALUE3;  

    A grid column will be bound to an object of type CustomObject. Based on the value in member property (VALUE1, VALUE2, etc) inside the column cell will be displayed an icon trough the use of a converter. The user will select on or more criteria (VALUE1, VALUE2, VALUE1 OR VALUE2, etc) in a custom row filter menu (like in the custom row example).

    I would like to be able to filter that column however I don't understand how to configure/bind the composite filter to use the Property member of the CustomObject when it filters (since the column cells will only contain an icon). Secondly, I don't understand how the association between a composite filter and a particular column is being made, such that when handling the Click event, I can retrieve the composite filter that is associated with that column.

    Any help would be appreciated.
    Thank you.

  2. Answer
    Veselin Vasilev
    Veselin Vasilev avatar
    2992 posts

    Posted 31 May 2010 Link to this post

    Hi Laurian Angelescu,

    Can you please check the attached application?
    Its datasource are custom object and one of the fields is Enum. I am using CellTemplate with an Image in it and the converter sets the source of the image based on the enum value.

    The filtering in this case shows correctly the values of the enum property.

    Let me know if this is helpful.

    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft R3 2016 release webinar banner
Back to Top