我有一个网格,我想改变背景颜色,如下所示:
.k-grid .k-state-selected {
background-color: #11DED7;
color:blue;
}
但它不起作用,只应用颜色:蓝色但背景颜色不适用。为什么会这样?
背景颜色始终为白色。
这是网格的HTML代码:
<link href="@Url.Content("~/Content/kendo/2016.3.1028/kendo.common-bootstrap.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2016.3.1028/kendo.mobile.all.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2016.3.1028/kendo.dataviz.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2016.3.1028/kendo.bootstrap.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2016.3.1028/kendo.dataviz.bootstrap.min.css")" rel="stylesheet" type="text/css" />
@(Html.Kendo().Grid<TelerikMvcApp4.Models.MarcaParecido>()
.Name("GridMarcaPar")
.Columns(columns =>
{
columns.Bound(e => e.DescMarca).Title("Marca").Width(70);
columns.Bound(e => e.DescTitular).Title("Titular").Width(100);
})
.Sortable()
.Pageable()
.ColumnMenu()
.Selectable()
.Scrollable()
.Filterable()
.HtmlAttributes(new { style = "height:550px;" })
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Id(p => p.CodMarca);
})
.PageSize(20)
.Read(read => read.Action("MarcaParecido", "Busqueda"))
)
)