New to Telerik UI for ASP.NET AJAX? Download free 30-day trial


It is not always possible to provide all properties that might be needed for a given scenario. The RadTreeNode object provides a special collection called Attributes that can store any number of name and value pairs.

The custom attribute's name should not be an HTML reserved word. Please see this articlefor more information.

  • Attributes can be defined declaratively by simply adding HTML attributes to a RadTreeNode tag.

  • To add an attribute at runtime on the server, use the Add() method of the RadTreeNode Attributes object passing a key string and a value string.

RadTreeNode root1 = new RadTreeNode("root1");
root1.Attributes.Add("My Key", "My Value");
Dim root1 As New RadTreeNode("root1")
root1.Attributes.Add("My Key", "My Value")

See Also

In this article