Reputation: 415
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
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