2011-03-09 80 views
0

我有一个Telerik的MVC电网,服务器绑定,每行有“选择”按钮, 我想让到了“图片” 我用下面的定义按钮但它不起作用Telerik的MVC网格图像按钮

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

为什么?

另一个问题,我可以改变按钮的图像,如果是的话,怎么样?

回答

0

我的问题是,我把风格的脚本在头 解决方案:把风格的脚本在体内

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