This is a migrated thread and some comments may be shown as answers.

different select color for different grid

2 Answers 130 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bertha
Top achievements
Rank 1
Bertha asked on 14 Mar 2017, 01:52 PM

I am using SPA with Kendo grid.  Can I apply different select color for different grid?  I tried to put the below style in my sub page.  But it will override my hosting page as well.  Thanks.

<style>
.k-grid .k-state-selected {
background-color: #cbf1e3 !important;
color: #000000;
}
.k-grid .k-alt.k-state-selected {
background-color: #cbf1e3 !important;
color: #000000;
}
</style>

2 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 15 Mar 2017, 02:53 PM
Hello Bertha,

This can be achieved by making the selector more specific using the Grids' ID attribute.

For example: 

#gridOne.k-grid .k-state-selected {
 background-color: #cbf1e3 !important;
 color: #000000;
}
 
#gridTwo.k-grid .k-state-selected {
 background-color: #cbf1e3 !important;
 color: #000000;
}

I hope this will help to achieve the desired result.

Regards,
Stefan
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data (charts) and form elements.
0
Bertha
Top achievements
Rank 1
answered on 15 Mar 2017, 02:58 PM
Yes, totally forgot this CSS rule.  Thanks.
Tags
Grid
Asked by
Bertha
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Bertha
Top achievements
Rank 1
Share this question
or