Joshua Slocum
Joshua Slocum

Reputation: 103

Sort a GridButtonColumn in a Telerik RadGrid control

I need to sort a GridButtonColumn in a C# asp.net project.

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?)


EDIT:

I added the namespace and now I get this error

Unknown server tag 'telerik:GridButtonColumnWithFilteringSorting

Upvotes: 0

Views: 1663

Answers (2)

Rob
Rob

Reputation: 919

If you develop a web application project there is no app_code folder. In this case you can just put the GridButtonColumnWithFiltering.cs file anywhere you want and register it like this:

<%@ Register Assembly="YourAssemblyName" TagPrefix="custom" Namespace="GridButtonColumnWithFilteringSortingNS" %>

Upvotes: 1

Dustin Hodges
Dustin Hodges

Reputation: 4195

The GridButtonColumn exists in the namespace Telerik.Web.UI. Try changing the Imports directive in your VB code from

Imports Telerik.WebControls

to

Imports Telerik.Web.UI

Response to Edit:

GridButtonColumnWithFilteringSorting is the class name of the custom GridButtonColumn that the above article creates. In order to help you with this we probably need to see your code/markup for the your site. In the above article it registers the custom button column as

<Register TagPrefix="custom" Namespace="GridButtonColumnWithFilteringSortingNS">

Did you do this in your markup file? If so change any

<telerik:GridButtonColumnWithFilteringSorting .. >

to

<custom:GridButtonColumnWithFilteringSorting . . >

Upvotes: 1

Related Questions