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

[Solved] auto change filter function

2 Answers 92 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Yi-Chien Chen
Top achievements
Rank 1
Yi-Chien Chen asked on 21 May 2009, 11:46 AM

I like the demo below and plan to use this concept to my project.
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx

Can I change the filter function based on the data type automatically?
For instance, when the data in the column is
1. data type: int...it will use slidebar filter
2. data type: datetime... it will use calendar filter
3. and so on...

Can anyone suggest how to do it?

Thanks,
Billy

2 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 26 May 2009, 06:25 AM
Hello,

In order to achieve the described functionality you may implement a template which to render different controls depending on column's type and assign this template to the desired columns. I have attached a very basic implementation of this approach to demonstrate how to setup the custom template and get you started with the implementation.

Regards,
Rosen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Yi-Chien Chen
Top achievements
Rank 1
answered on 26 May 2009, 06:32 AM

Thank you very much.
The information you provided is very helpful!
Tags
Grid
Asked by
Yi-Chien Chen
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Yi-Chien Chen
Top achievements
Rank 1
Share this question
or