user9287106
user9287106

Reputation: 151

Custom Styling not getting applied to the kendo grid in Angular 6

Hi I am trying to add custom styling to the selected rows in kendo grid, but it is not getting applied.

Following is my code in css file of that component

:host ::ng-deep .modal-dialog .k-grid td.k-state-selected, .k-grid tr.k-state- 
 selected>td {
background-color:lightgreen;
}

I had contacted telerik support they asked me to add encapsulation:ViewEncapsulation.None in ts file but after adding that the style is getting applied for all the components, so i am not able to find why its not getting applied.

In one of the question on stackoverflow i found :host ::ng-deep by adding this it will work so i tried but still its not working.

My Kendo-Grid is on Bootstrap Modal Popup.

Upvotes: 0

Views: 1282

Answers (1)

user9287106
user9287106

Reputation: 151

it worked for me by doing following changes

:host ::ng-deep .modal-dialog .k-grid td.k-state-selected,:host ::ng-deep .k-grid tr.k- 
state-selected>td {
background-color:lightgreen;
}

Upvotes: 1

Related Questions