This is a migrated thread and some comments may be shown as answers.
RadTreeView Node Text Formatting
1 Answer 32 Views
This is a migrated thread and some comments may be shown as answers.
Nate
Top achievements
Rank 1
Nate asked on 14 Jul 2011, 04:02 AM
For the radtreeview I need to format the next for each node. I do not see a way to do this.
If you can please expain how this is done.

Thank you.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 14 Jul 2011, 05:50 AM
Hello Nate,

You can format the RadTreeView node by attaching the server side event onnodeedit. Here is the sample code that I tried which worked as expected.

aspx:
<telerik:RadTreeView ID="RadTreeView1"  AllowNodeEditing="true" runat="server" onnodeedit="RadTreeView1_NodeEdit">
   <Nodes>
      . . . . .
   </Nodes>
</telerik:RadTreeNode>

C#:
protected void RadTreeView1_NodeEdit(object sender, RadTreeNodeEditEventArgs e)
{
       RadTreeNode nodeEdited = e.Node;
       string newText = e.Text;
       nodeEdited.Text = newText;
}

Thanks,
Shinu.
Asked by
Nate
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or