【问题标题】:Sort a GridButtonColumn in a Telerik RadGrid control在 Telerik RadGrid 控件中对 GridButtonColumn 进行排序
【发布时间】:2013-05-23 17:47:44
【问题描述】:

我需要在 C# asp.net 项目中对 GridButtonColumn 进行排序。

我已添加此线程中列出的 c# 类

http://www.telerik.com/community/code-library/aspnet-ajax/grid/filtering-and-sorting-for-gridbuttoncolumn.aspx

我无法让它工作。我明白了

类型或命名空间名称 找不到“GridButtonColumn”

是否需要添加 using 指令?

VB 示例使用Imports Telerik.WebControls。当我添加 using Telerik.WebControls; 时,我会收到此消息

类型或命名空间名称 'WebControls' 不存在于 命名空间“Telerik”(你错过了吗? 程序集参考?)


编辑:

我添加了命名空间,现在出现此错误

未知的服务器标签 'telerik:GridButtonColumnWithFilteringSorting

【问题讨论】:

    标签: c# asp.net telerik


    【解决方案1】:

    GridButtonColumn 存在于命名空间 Telerik.Web.UI 中。尝试更改 VB 代码中的 Imports 指令

    Imports Telerik.WebControls
    

    Imports Telerik.Web.UI
    

    对编辑的回应:

    GridButtonColumnWithFilteringSorting是上面文章创建的自定义GridButtonColumn的类名。为了帮助您解决这个问题,我们可能需要查看您网站的代码/标记。在上面的文章中,它将自定义按钮列注册为

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

    您是否在标记文件中执行此操作?如果是这样,请更改任何

    <telerik:GridButtonColumnWithFilteringSorting .. >
    

    <custom:GridButtonColumnWithFilteringSorting . . >
    

    【讨论】:

      【解决方案2】:

      如果您开发 Web 应用程序项目,则没有 app_code 文件夹。在这种情况下,您可以将 GridButtonColumnWithFiltering.cs 文件放在您想要的任何位置并像这样注册它:

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

      【讨论】:

        猜你喜欢
        • 2015-05-02
        • 2011-11-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多