2011-03-09 78 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'); 
}