• What is KendoReact
  • Getting Started
  • Server Components
  • Components
  • Sample Applications
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Changelog
  • Updates
  • Troubleshooting

Set different row colors for each level of the TreeList items

Environment

Product Version5.09.0
ProductProgress® KendoReact

Description

I want to have different colors for the TreeList rows based on the level of the data item.

Solution

For achieving the desired result the rowRender of the TreeList can used for setting custom backgroundColor for each TR element based on the "level" value of the TreeListRowProps

Following is an example demonstrating such implementation

Example
View Source
Change Theme:

In this article

Not finding the help you need?