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

Disable collapse/expand in treeview

1 Answer 526 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Lubomir
Top achievements
Rank 1
Lubomir asked on 01 Nov 2012, 08:23 AM
Hello,
i want to disable this functionality - expand and collapse. When i loaded my tree I using tree.ExpandAllNodes().
After that i hidden buttons(checkboxes) for this activity, but now they are invisible but they work.

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 01 Nov 2012, 09:14 AM
Hi Lubomir,

I suppose you want to disable collapsing of the RadTreeNode. Try canceling collapsing in the OnClientNodeCollapsing event of RadTreeView.

ASPX:
<telerik:RadTreeView ID="RadTreeView1" runat="server" OnClientNodeCollapsing="OnClientNodeCollapsing">
    <Nodes>
      ...............
    </Nodes>
</telerik:RadTreeView>

JS:
<script type="text/javascript">
    function OnClientNodeCollapsing(sender, args) {
        args.set_cancel(true);
    }
</script>

Hope this helps.

Regards,
Princy.
Tags
TreeView
Asked by
Lubomir
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or