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

Disable parent check boxes in RadTreeView

1 Answer 247 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Tanya
Top achievements
Rank 1
Tanya asked on 18 Oct 2012, 04:03 PM
i have a RadTreeView, but i only want check boxes on child nodes, is there a way to disable them for the parent items?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 Oct 2012, 04:35 AM
Hi Tanya,

Try the following code to achieve your scenario.

C#:
protected void RadTreeView1_NodeDataBound(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)
{
  if (e.Node.Level == 0)
  {
    e.Node.Checkable = false;
  }
}

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