The desired result can be achieved using the columns.template property. This will allow setting a custom element in the cell and modifying its attributes and their values:
This does not solve my problem. I don't want to add additional elements. The templates only seem to modify what is within the tag. I want to add an attribute to the Index tag and give it a value that is not fixed but the value of another property field.
0
Stefan
Telerik team
answered on 08 Aug 2017, 07:08 AM
Hello Steven,
Currently, the Kendo UI TreeList supports add dynamic values using the template property.
Custom attributes can be added to the cells directly, but this will allow setting only static values as that property does not have access to the row data as the template does:
Still, I can suggest another custom approach to add a custom class, and then on the dataBound event to select all elements using jQuery and to append the desired custom attribute to them: