Gurpreet Singh
Gurpreet Singh

Reputation: 415

overriding cell style for angular kendo grid

I am trying to change the padding of the cell and set it to smaller values based on the resolution. But i have not been successful in doing do. The only option that had worked for me is by setting the style on the column:

[style]="{'padding':'5px'}"

I have tried rowClass, class etc. But none seem to have any effect on the template. even tried specifying the padding using .k-grid th, .k-grid td. But it had no effect. If any one was successful, please let me know how we could change the style on the class based on resolution.

Upvotes: 2

Views: 1796

Answers (1)

Gurpreet Singh
Gurpreet Singh

Reputation: 415

I was able to resolve this by specifying the following on my component

encapsulation: ViewEncapsulation.None

also its important to add ".k-grid" in the style. So it should be something like

.k-grid .no-padding{ padding :0px }

Upvotes: 1

Related Questions