开发者

telerik mvc grid image button

开发者 https://www.devze.com 2023-02-15 23:22 出处:网络
I have a telerik mvc grid , server binding , each row has \"Select\" button , I want to let the button to has \"Image\"

I have a telerik mvc grid , server binding , each row has "Select" button , I want to let the button to has "Image" I use the following definition but it doesn't work

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

why?

another question , can I change the image of the 开发者_开发知识库button , if yes, how?


my problem was that , I put the style in a script in the header solution : put the style in a script in the body


You can give .HtmlAttributes your button like

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号