TreeList Custom Cell for Expandable Column

1 Answer 197 Views
TreeList
Janki
Top achievements
Rank 4
Bronze
Iron
Iron
Janki asked on 21 Oct 2021, 11:02 PM | edited on 21 Oct 2021, 11:03 PM

I haven't been able to render a custom cell for the column that's housing the expandable cells. If I set `cell` to `CustomCell`, the expandability (the carrot dropdowns) disappears. I couldn't find an example in the docs that showed the actual expandable cells getting rendered custom (just the regular cells with values) - could you please show me a simple example to get me on the right track? Is it that I should build the expandable carrots into the custom cell myself or did I miss something in the docs?

 

Thank you!

1 Answer, 1 is accepted

Sort by
2
Accepted
Filip
Telerik team
answered on 22 Oct 2021, 11:25 AM

Hello,  Janki,

To render an expandable custom cell it is necessary to add the icon classes as shown in the following example. We are adding this internally in the default cell, but when the developer overwrites the default rendering, these elements have to be added programmatically:

https://stackblitz.com/edit/react-t7mgw9-u7sljz?file=app/main.jsx

 Regards, PhilipProgress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Janki
Top achievements
Rank 4
Bronze
Iron
Iron
commented on 22 Oct 2021, 01:47 PM | edited

Thank you so much, Filip! This saved me a lot of troubleshooting and confusion. I think your example would be a great addition to the KendoReact docs!
Tags
TreeList
Asked by
Janki
Top achievements
Rank 4
Bronze
Iron
Iron
Answers by
Filip
Telerik team
Share this question
or