How to set the height of tree view

Hi,
Is there any way to set a specific height for the treeview with scroll bars?
Thank you,
Kalum

3 Replies

SK Shanmugaraja K Syncfusion Team September 11, 2018 07:32 AM UTC

Hi Kalum, 
 
Thank you for using Syncfusion products. 
 
We suggest you to use Height property to achieve your requirement in TreeView. You can use this to restrict height of the TreeView for scrollbars. Please refer the below code example, 
 
[CSHTML
 
 
  @(Html.EJ().TreeView("tree").TreeViewFields(s => s.Datasource((IEnumerable<loadondemand>)ViewBag.datasource).Id("id").ParentId("pid") .Text("name").HasChild("hasChild").Expanded("expanded")).Height("100px").Width("250px")) 
 
 
Please try the above solution and check whether this fulfilling your requirement. If not, please get back to us with more details. 
 
Regards, 
Shanmugaraja K 
 



KA kalum September 14, 2018 11:23 AM UTC

Hi Shanmugaraja,
Your solution is working fine. Thank you very much for the help.
Kalum


SK Shanmugaraja K Syncfusion Team September 14, 2018 12:30 PM UTC

Hi Kalum, 
 
Most welcome, please let us know if you need any assistance. 
 
Regards, 
Shanmugaraja K 


Loader.
Up arrow icon