How can I add custom class to row based on dataItem?
I think I could use rowTemplate, but that would ignore columns.template which is not OK. I also don't want to change rowTemplate just add some custom classes.
1 Answer, 1 is accepted
0
Accepted
Dimiter Topalov
Telerik team
answered on 12 Oct 2016, 01:28 PM
Hello Matjaž,
You can handle the dataBound event, obtain all rendered items (rows) via the items() method, loop through them and use the dataItem() method to get the corresponding data item, then conditionally add custom class(es) to the TR, based on some property of the data item: