Add Class to Treelist Arrow

0 Answers 35 Views
TreeList
Lee
Top achievements
Rank 2
Bronze
Bronze
Bronze
Lee asked on 26 Jul 2024, 07:36 PM | edited on 26 Jul 2024, 07:37 PM

I'm trying to add a class to the kendo treelist arrow based on the data in the grid, however when I expand a row now, the class disappears for this and all other rows. How can I retain that class? Here is a dojo with an example. In the dojo, you will notice that if the person's name is not "Guy Wooten", they get a class of "maroon". That is then used to turn the drop arrow red. As soon as you click the person, the arrow turns black. I need it to stay red. You'll also notice that none of the subsequent ones have the red anymore either. How do I fix that? 

https://dojo.telerik.com/@dojolee/IyOGeduk

Note: Neither versions 2022 or 2024 work correctly, but in 2022, the subsequent rows keep their class.

Lee
Top achievements
Rank 2
Bronze
Bronze
Bronze
commented on 26 Jul 2024, 08:05 PM

I found a workaround for my situation which is to target the closest td, add a class there, and update my CSS and JS based on the td's class. 
Nikolay
Telerik team
commented on 31 Jul 2024, 09:25 AM

Hi Lee,

This is a valid approach you have found. If you have the time you can share the code here so the community benefits from it.

Regards,

Nikolay

No answers yet. Maybe you can help?

Tags
TreeList
Asked by
Lee
Top achievements
Rank 2
Bronze
Bronze
Bronze
Share this question
or