Posted 06 Jul 2011 Link to this post
<
telerik:RadTreeView
ID
=
"trvEntities"
runat
"server"
DataSourceID
"dataSourceEntities"
DataFieldID
"Id"
AppendDataBoundItems
"true"
OnNodeDataBound
"trvEntities_NodeDataBound"
>
DataBindings
telerik:RadTreeNodeBinding
TextField
"Name"
Depth
"0"
/>
</
Nodes
telerik:RadTreeNode
Expanded
Text
"Select an Entity"
Value
"-1"
protected
void
trvEntities_NodeDataBound(
object
sender, RadTreeNodeEventArgs e)
{
trvEntities.Nodes.Remove(e.Node);
trvEntities.Nodes[0].Nodes.Add(e.Node);
}
Posted 08 Jul 2011 Link to this post
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
<telerik:RadTreeView ID="trvEntities" runat="server" DataSourceID="dataSourceEntities" DataFieldID="Id" AppendDataBoundItems="true" OnNodeDataBound="trvEntities_NodeDataBound"> <Nodes> <telerik:RadTreeNode Expanded = "true" Text="All Entities" Value="0"> <DataBindings> <telerik:RadTreeNodeBinding TextField="Name" /> </DataBindings> </telerik:RadTreeNode> </Nodes> </telerik:RadTreeView> So, this tree will be something like this: + All Entities |Entity1 |Entity2 |Entity3 I've managed to do it with the code-behind, but is there any declarative way to do this? Thanks! Tiago Ribeiro
"All Entities"
Posted 13 Jul 2011 Link to this post