2015-10-06 61 views
0

我想添加圖標並更改劍道網格按鈕的大小。該發動機是剃刀這裏是代碼:將幾種樣式添加到Kendo網格按鈕

@(Html.Kendo().Grid<WEB02.ConfigurationModel.TestGrid>() 
.Name("grid") 
.Columns(columns => 
{ 

    columns.Bound(o => o.Name).Width(110); 
    columns.Bound(o => o.Type).Width(130); 
    columns.Command(command => {command.Destroy(); 

    command.Custom("higher Order").Click("showDetails"); 
    command.Custom("AnotherCommand").Text(" ").HtmlAttributes(new { style = "background:url(/Images/Configuration/Up.png) left no-repeat" }); 

    }); 
}) 
.Sortable() 
.Scrollable(scrollable => scrollable.Virtual(true)) 
.HtmlAttributes(new { style = "height:430px;" }) 
.DataSource(dataSource => dataSource 
    .Ajax() 
    .Model(model => model.Id(p => p.Name)) 
    .PageSize(100) 
    .Read(read => read.Action("ActivityGrid", "Configuration")) 
    .Destroy("TestDelete", "Configuration") 
    .Events(events => events.Sync("sync_handler"))  
    ) 


    .Pageable(pageable => pageable 
     .Refresh(true)) 

我能只有一個造型條件添加使用HtmlAttributes此按鈕。但我想添加更多,因爲我想改變按鈕的大小。每當我添加任何東西到它,電網故障! 有什麼建議嗎?

回答

0

您有其他幾個選項而不是去是這樣的:

  • 添加,而不是添加樣式類,那麼該類
  • 使用模板列 .ClientTemplate(「一些文本」)
  • 添加CSS