You can traverse all TreeNodes in the Page_Load event using the GetAllNodes() method of Telerik RadTreeView and add the number of child nodes to the parent node's Text using code similar to the shown below.
Example:
| C# |
Copy Code |
|
... protected override Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ArrayList allNodes = RadTree1.GetAllNodes();
foreach (RadTreeNode node in allNodes) { if (node.Nodes.Count > 0) node.Text = node.Text + " (" + node.Nodes.Count.ToString() + ")"; } } } ... |