【问题标题】:telerik mvc grid image buttonTelerik mvc 网格图像按钮
【发布时间】:2011-03-09 14:47:14
【问题描述】:

我有一个 telerik mvc 网格,服务器绑定,每一行都有“选择”按钮, 我想让按钮有“Image” 我使用以下定义,但它不起作用

columns.Command(commands => commands.Select().ButtonType(GridButtonType.Image)).Title("");

为什么?

另一个问题,我可以更改按钮的图像,如果可以,如何?

【问题讨论】:

    标签: telerik-grid telerik-mvc


    【解决方案1】:

    我的问题是,我将样式放在标题中的脚本中 解决方案:将样式放在正文中的脚本中

    【讨论】:

      【解决方案2】:

      你可以给.HtmlAttributes你的按钮点赞

      columns.Command(commands => commands.Select().ButtonType(GridButtonType.Image)).HtmlAttributes(new { @class="btn"}).Title("");
      
      //and you have to override the image with your class
      .btn .t-icon{
          background-image: url('../../Images/img.png');
      }
      

      【讨论】:

        猜你喜欢
        • 2012-07-10
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多