0

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

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

为什么?

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

4

2 回答 2

0

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

于 2011-03-13T06:52:06.637 回答
0

你可以给.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');
}
于 2014-07-24T07:35:15.810 回答