【发布时间】:2011-03-09 14:47:14
【问题描述】:
我有一个 telerik mvc 网格,服务器绑定,每一行都有“选择”按钮, 我想让按钮有“Image” 我使用以下定义,但它不起作用
columns.Command(commands => commands.Select().ButtonType(GridButtonType.Image)).Title("");
为什么?
另一个问题,我可以更改按钮的图像,如果可以,如何?
【问题讨论】:
我有一个 telerik mvc 网格,服务器绑定,每一行都有“选择”按钮, 我想让按钮有“Image” 我使用以下定义,但它不起作用
columns.Command(commands => commands.Select().ButtonType(GridButtonType.Image)).Title("");
为什么?
另一个问题,我可以更改按钮的图像,如果可以,如何?
【问题讨论】:
我的问题是,我将样式放在标题中的脚本中 解决方案:将样式放在正文中的脚本中
【讨论】:
你可以给.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');
}
【讨论】: