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

Problems inheriting GridTemplateColumn

1 Answer 40 Views
Filter
This is a migrated thread and some comments may be shown as answers.
shyka
Top achievements
Rank 1
shyka asked on 06 Feb 2011, 03:46 PM
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;

 

}

}

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 07 Feb 2011, 05:56 PM
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.
Tags
Filter
Asked by
shyka
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or