Using Node Template with different node heights

Hi,

using your example https://blazor.syncfusion.com/documentation/treeview/template/I saw how to use custom template in TreeView..
Everything works fine if the nodes of the TreeView are all the same. 
If I want to use different heights for the various levels, what should I do?

waiting for your kind reply
regards

1 Reply 1 reply marked as answer

IL Indhumathy Loganathan Syncfusion Team March 22, 2021 09:51 AM UTC

Hi Salvatore, 
 
Greetings from Syncfusion support. 
 
We have validated your requirement in TreeView component. You can customize the tree nodes based on levels by adding custom CssClass to the component and adding required styles. In the below code snippets, we have added a CssClass custom to TreeView component and set the height for different level of nodes. 
 
.custom .e-level-1 > .e-fullrow { 
    height: 80px; 
} 
 
.custom .e-level-2 > .e-fullrow { 
    height: 77px; 
} 
 
.custom .e-level-3 > .e-fullrow { 
    height: 72px; 
} 
 
.custom .e-level-4 > .e-fullrow { 
    height: 62px; 
} 
 
Please find the sample demonstrating the solution from below link. 
 
 
To know more about the Blazor TreeView component, refer to the below links.  
  
 
 
 
Please, let us know if you need any further assistance. 
 
Regards, 
Indhumathy L

Marked as answer
Loader.
Up arrow icon