Changing color of selected row

2 Answers 5123 Views
Grid
habeeb
Top achievements
Rank 1
habeeb asked on 04 May 2016, 10:08 PM

@(Html.Kendo().Grid<SomeViewModel>()
 .Name("SomeGrid")
 .Columns(columns =>
 {
        columns.Bound(p => p.Id);
 })
 .Events(e => e.DataBound("onDataBound"))
 .Selectable(selectable => selectable.Enabled(true).Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
    .Scrollable()
 .Filterable()
    .DataSource(dataSource => dataSource
 .Ajax()
 .Read(...)
 )
 )

 

 When the row is selected, color changes to orange. How do I modify this behavior to not change to any color at all ?

 

2 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 05 May 2016, 03:36 PM
Hello Habeeb,

You can apply the following two CSS rules, which will set the background color to the selected row as it is in the Default skin, preventing the row from being colored in orange:
.k-grid .k-state-selected  {
  background-color: #ffffff !important;
  color: #000000;
}
 
.k-grid .k-alt.k-state-selected {
  background-color: #f1f1f1 !important;
  color: #000000;
}



Regards,
Ivan Danchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
habeeb
Top achievements
Rank 1
commented on 05 May 2016, 04:49 PM

Thanks Ivan.

 

 

0
JoeThomas
Top achievements
Rank 1
Veteran
answered on 27 Apr 2021, 06:47 AM

I posted an Angular Kendo Grid question here for background color, maybe you can help

https://stackoverflow.com/questions/67278144/angular-kendo-grid-background-color-of-selected-row

Thanks,

 

Ivan Danchev
Telerik team
commented on 28 Apr 2021, 12:55 PM

For questions on the Kendo UI for Angular Grid, open a thread on the Kendo UI for Angular forums: https://www.telerik.com/forums/kendo-angular-ui

Tags
Grid
Asked by
habeeb
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
JoeThomas
Top achievements
Rank 1
Veteran
Share this question
or