2015-10-06 62 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