3
votes

In the kendo grid component for angular, how do I achieve something akin to the following?

<kendo-grid-column field="value" [class]={'danger': dataItem.value > 30}>
</kendo-grid-column>

I know I can put a template inside the kendo-grid-column and that template has access to the dataItem, but that only allows me to set a class on elements in the template and not on the td itself.

1

1 Answers

0
votes

Please try using ngClass like that:

<kendo-grid-column field="value" [ngClass]="(dataItem.value > 30) ? 'danger': ''">
</kendo-grid-column>