Problems inheriting GridTemplateColumn

2 posts, 0 answers
  1. shyka
    shyka avatar
    12 posts
    Member since:
    Mar 2007

    Posted 06 Feb 2011 Link to this post

    when i try to replace GridTemplateColumns with my customFilteredGridTemplateColumns the RadGrid isnt shown due to many bugs which seems irrelevant to Rad objects at all. what am i doing wrong? here is my implementation:

     

     

    public class CustomFilteredGridTemplateColumn : GridTemplateColumn

     

    {

     

     

    public override GridColumn Clone()

     

    {

     

     

    return base.Clone();

     

    }

     

     

    protected override void SetupFilterControls(System.Web.UI.WebControls.TableCell cell)

     

    {

     

     

    base.SetupFilterControls(cell);

     

    cell.Controls.RemoveAt(0);

    cell.Controls.AddAt(0,

     

    new TextBox());

     

    }

     

     

    public override bool SupportsFiltering()

     

    {

     

     

    return true;

     

    }

     

     

    protected override string GetFilterDataField()

     

    {

     

     

    return this.DataField;

     

    }

     

     

    protected override void SetCurrentFilterValueToControl(TableCell cell)

     

    {

     

     

    base.SetCurrentFilterValueToControl(cell);

     

    (cell.Controls[0]

     

    as TextBox).Text = this.CurrentFilterValue;

     

    }

     

     

    protected override string GetCurrentFilterValueFromControl(TableCell cell)

     

    {

     

     

    return (cell.Controls[0] as TextBox).Text;

     

    }

    }

  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 07 Feb 2011 Link to this post

    Hi,

    Please verify that you have included the correct register directive for
    custom: CustomFilteredGridTemplateColumn

    You can refer to the help article below for additional information:
    http://www.telerik.com/help/aspnet-ajax/grdimplementingfilteringfortemplatecolumns.html

    Greetings,
    Pavlina
    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. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top