This is a migrated thread and some comments may be shown as answers.

Hide expand/collapse button for level 0 nodes

1 Answer 103 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 2
Adam asked on 08 Jul 2011, 08:15 PM
Does anyone know if it Is it possible to hide the expand/collapse button at all?  I am trying to preserve as much horizontal space as possible and also fulfill a requirement that the first level of nodes is always expanded.

I've come across a solution for the ASP.NET AJAX suite but nothing for the WinForms (http://www.telerik.com/community/forums/aspnet-ajax/treeview/drop-expand-collapse-image-from-root-node.aspx#854721)

Thanks,
Adam

1 Answer, 1 is accepted

Sort by
0
Adam
Top achievements
Rank 2
answered on 08 Jul 2011, 08:21 PM
Actually I just figured out a solution.  In case anyone is interested:

Changing the radTreeView.TreeElement.Margin.Left to -30 works to hide the image.  The node can still be expanded/collapsed via double-clicking, so I handle the NodeExpandedChanging and cancel it if is level 0.
Tags
Treeview
Asked by
Adam
Top achievements
Rank 2
Answers by
Adam
Top achievements
Rank 2
Share this question
or