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

How to create a FilterTemplate progammatically?

1 Answer 37 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ralf
Top achievements
Rank 1
Ralf asked on 16 Aug 2011, 10:20 AM
Hi,

I need to know how to create a FilterTemplate programmatically (c#) in Business layer. In the cloumn filter row I need a textbox to enter the filter expression and a button that allow the user to reset the column filter without clearing the texbox manually. The filter options button should be not available. How to do this?
The grid will be created programmatically because of dynamic using. I have found an example to create an ItemTemplate. But whats the difference to FilterTemplate?

public class MyFilterTemplate : ITemplate....
And then?.....

Best regards,
Ralf

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 19 Aug 2011, 10:08 AM
Hi Ralf,

Both the ItemTemplate and FilterTemplate should implement the ITemplate interface. There is not difference in the implementation of both. The difference is that the FilterTemplate appears in one place and the ItemTemplate on another place in the grid. So you can define the FilterTemplate the same way you would do for the ItemTemplate. But instead of using it for the ItemTemplate of a column, you would use to for the FilterTemplate property. 

Greetings,
Iana
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Ralf
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or