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

Simple Filtering Change Desired

1 Answer 62 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.
Matt Kalinowski
Top achievements
Rank 1
Matt Kalinowski asked on 07 Jun 2010, 08:37 PM
Hello,

I'm working on a simple backend admin table and came upon a small problem.  I have a role class and each role has a team associated with it (Role.teamId);  Everything in the table populates fine, but the filtering could be better.  When the user goes to filter based on team, the filter shows the teamId, and I'd prefer it to show Team.name (I have a collection of all the teams and the UI shows teams based on Team.name).  Upon looking up how to do this, it seems I need to modify the prepare() of a custom FilterControl ... is this correct, and if so, how would I go about making this small change?  If not, what should I instead be doing.

Thanks for your time - I appreciate it,
Matt

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 08 Jun 2010, 08:42 AM
Hi Matt Kalinowski,

There is a complete example on how to develop your own control at my blog post. This is another blog with a custom filtering control.

Alternatively, you can simply use an IValueConverter on the column's DataMemberBinding. The stock filtering control will respect it and show the converted values, so your converter could be taking in ID's and returning Names. Or anything else that you want as a matter of fact. This in my opinion would be the easier approach.

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
Matt Kalinowski
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or