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

Custom filter of column bound to custom object

1 Answer 82 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Laurian Angelescu
Top achievements
Rank 1
Laurian Angelescu asked on 26 May 2010, 03:23 PM

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.

1 Answer, 1 is accepted

Sort by
0
Accepted
Veselin Vasilev
Telerik team
answered on 31 May 2010, 10:01 AM
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.

Regards,
Veskoni
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.
Tags
GridView
Asked by
Laurian Angelescu
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or