【问题标题】:Telerik Kendo Grid custom command iconTelerik Kendo Grid 自定义命令图标
【发布时间】:2017-02-16 04:39:23
【问题描述】:

我在我的应用程序中使用剑道网格,每行都有自定义命令,如下所示:

.Columns(
        columns =>
        {
           //fields 1
           //fields 2
            columns.Command(command =>
            {
                command.Custom("View").Click("view");
                command.Custom("Edit").Click("edit");
                command.Custom("Delete").Click("delete");
            }).Width(300);
        }
)

它可以工作,但现在我需要放置图标(真棒字体?)而不是字符串。 谢谢你的帮助

【问题讨论】:

    标签: asp.net-mvc telerik kendo-grid font-awesome


    【解决方案1】:

    您可以使用 CSS 自定义按钮的外观。在以下示例中,按钮是使用背景图像自定义的。

    .k-grid-content .k-button {
      width: 20px;
      height: 20px;
      border: none;
      min-width: 0 !important;
      border-radius: 0;
      color: transparent;
      text-indent: -10000%;
      box-shadow: none !important;
    }
    
    .k-grid-content .k-button span {
       display: none;
     }
    
    .k-grid-content .k-button.k-grid-Edit {
      background: url(/img/icons/icon-edit.png) no-repeat;
    }

    我为你创建了一个道场。希望对您有所帮助。

    http://dojo.telerik.com/ETIYa/2

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-01
      • 1970-01-01
      • 2016-10-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多