I've added the c# class listed in this thread
http://www.telerik.com/community/code-library/aspnet-ajax/grid/filtering-and-sorting-for-gridbuttoncolumn.aspx
and I can't get it to work. I get this "The type or namespace name 'GridButtonColumn' could not be found"
Is there using directive that I need to add?
The VB example uses "Imports Telerik.WebControls". When I add using Telerik.WebControls; I get this message
"The type or namespace name 'WebControls' does not exist in the namespace 'Telerik' (are you missing an assembly reference?)"
7 Answers, 1 is accepted
You should use:
Imports Telerik.Web.UI
In the code library two archives are available. One for the classic controls and one for the newer Ajax controls.
You should use GridButtonColumnWithFilteringSorting-AJAX.zip
I just tested it and it is working fine. You just need to copy Telerik.Web.UI.dll from the installation folder of the RadControls to the \bin folder of the website after extracting it from the zip file.
All the best,
Vasil
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.

Server Error in '/Ajax' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 30: <compilation debug="true">
Line 31: <assemblies>
Line 32: <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 33: <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
Line 34: <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|

I’m getting this error message in my project
“Unknown server tag 'telerik:GridButtonColumnWithFilteringSorting'.”
I have added this tag to the page
<%@ Register TagPrefix="custom" Namespace="GridButtonColumnWithFilteringSortingNS" %>
For this column I changed the “GridButton” to “GridButtonColumnWithFilteringSorting”
<telerik:GridButtonColumnWithFilteringSorting ButtonType="LinkButton" UniqueName="Description" SortExpression="Description"
ShowSortIcon="true" HeaderText="Task Description" ItemStyle-HorizontalAlign="Left"
DataTextField="TaskLookupDtls.Description">
</telerik:GridButtonColumnWithFilteringSorting>
And I added this class GridButtonColumnWithFiltering.cs
using Telerik.Web.UI;
using System.Web.UI.WebControls;
namespace GridButtonColumnWithFilteringSortingNS
{
public class GridButtonColumnWithFilteringSorting : GridButtonColumn
{
public string DataField
{
get
{
object MyRes = this.ViewState["_df"];
if (MyRes != null)
{
return (string)MyRes;
}
return string.Empty;
}
set { this.ViewState["_df"] = value; }
}
public override string SortExpression
{
get
{
object MyRes = this.ViewState["_se"];
if (MyRes != null)
{
return (string)MyRes;
}
return string.Empty;
}
set { this.ViewState["_se"] = value; }
}
protected override void SetupFilterControls(TableCell cell)
{
base.SetupFilterControls(cell);
cell.Controls.RemoveAt(0);
cell.Controls.AddAt(0, new TextBox());
}
public override GridColumn Clone()
{
return base.Clone();
}
protected override string GetFilterDataField()
{
return this.DataField;
}
protected override void SetCurrentFilterValueToControl(TableCell cell)
{
base.SetCurrentFilterValueToControl(cell);
if (!object.ReferenceEquals(this.CurrentFilterValue, string.Empty))
{
((TextBox)cell.Controls[0]).Text = this.CurrentFilterValue;
}
}
protected override string GetCurrentFilterValueFromControl(TableCell cell)
{
return ((TextBox)cell.Controls[0]).Text;
}
public override bool SupportsFiltering()
{
return true;
}
}
}
I am attaching a working version in C# of the example. Please check it out.
Kind regards,
Vasil
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.

I've added the class file and the register statements and It still won't sort. Is there something I need to change on the column. Here's what I have.
<custom:GridButtonColumnWithFilteringSorting
ButtonType="LinkButton"
UniqueName="Description"
SortExpression="Description"
ShowSortIcon="true"
HeaderText="Task Description"
ItemStyle-HorizontalAlign="Left"
DataTextField="TaskLookupDtls.Description">
</custom:GridButtonColumnWithFilteringSorting>
The column's declaration looks correct.
If the column is appearing now but you can click to sort it, then make sure to set AllowSorting="true" in the RadGrid's declaration.
If you still get "Unknown server tag" error then make sure that GridButtonColumnWithFiltering.cs is in the app_code folder of your project.
All the best,
Vasil
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.

<%@ Register Assembly="AssemblyName" TagPrefix="custom" Namespace="GridButtonColumnWithFilteringSortingNS
" %>
Cheers,
Robert