Is there a way to show the lines between parent and child nodes at TreeView ?
1 Answer, 1 is accepted
0
Stoyan
Telerik team
answered on 10 Sep 2021, 03:09 PM
Hi Fazil,
Thanks for the provided information.
Showing lines between the parent and child nodes in the Kendo TreeView is possible by utilizing the Node Template Directive. The template helps to customize the content of the nodes in any way the developer sees fit.
I've prepared a short StackBlitz demo that demonstrates the desired behavior.
The [style.paddingTop] is used for pushing the border and [style.borderTop] for creating the border above the first child node. The TreeView knows where to put a border-top as in the data there is a boolean key (first), which when set to true will target the child item node and place a border.
Hi Stoyan, What about treelist? Can we do the same for it as well?
Stoyan
Telerik team
commented on 09 Apr 2024, 07:23 AM
Hi Raju,
To do the same thing with the TreeList The developer can use the rowClasswhich can be used to change the CSS styles of each individual row based on some condition.