Telerik Kendo Grid自定义命令图标

时间:2016-10-07 08:31:19

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

我在我的应用程序中使用了一个kendo网格,每行使用自定义命令,如下所示:

.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);
        }
)

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

1 个答案:

答案 0 :(得分: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

相关问题