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

[Solved] Filtering a List<> column

1 Answer 65 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Eric Schoenholzer
Top achievements
Rank 2
Eric Schoenholzer asked on 04 Sep 2010, 01:25 AM

I'm binding a List<string> to a DataColumn via a ValueConverter, which returns a string:

<grid:GridViewDataColumn Header="Genres" DataMemberBinding="{Binding Genres, Converter={StaticResource ListConverter}}"  />

Now, no filter icon is shown. I tried to set a DataType, but got a runtime error.

Reading the threads here, I understand the filter works with the underlying data type. This would be a List<>.
Is this correct? Do I need to implement a comparable List<> ?
I don't see how this would help, because I would test two List<> (IComparable and IEquatable).
How would work a Contains-Filter?

What would be the easiest way? I need only the default filter for a string.

Thanks
Eric

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 06 Sep 2010, 08:26 AM
Hi Eric Schoenholzer,

Your best option would be to create a new property on your business object that will return this string. In this way you will have just a normal string column and everything will work as expected.

I hope this helps.

Kind regards,
Ross
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
Eric Schoenholzer
Top achievements
Rank 2
Answers by
Rossen Hristov
Telerik team
Share this question
or