How to create a FilterTemplate progammatically?

2 posts, 0 answers
  1. Ralf
    Ralf avatar
    77 posts
    Member since:
    Jun 2012

    Posted 16 Aug 2011 Link to this post


    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,

  2. Iana Tsolova
    Iana Tsolova avatar
    3388 posts

    Posted 19 Aug 2011 Link to this post

    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. 

    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.

  3. DevCraft R3 2016 release webinar banner
Back to Top