TreeViewNode.Name Property
Gets or sets the unique identifier name for the current node.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v19.1.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
String | String.Empty | A String value that specifies the node’s unique identifier name. |
Remarks
The Name property specifies the unique identifier name for the current node. This property can be used at runtime to obtain a particular node specified by its unique identifier name (via the TreeViewNodeCollection.FindByName method or ASPxClientTreeView.GetNodeByName and ASPxClientTreeViewNode.GetNodeByName methods on the client side) rather than by its index and display text.
Example
The code below adds a node with the default settings to the ASPxTreeView’s child collection, and then initializes its main properties.
The image below shows the result.
using DevExpress.Web.ASPxTreeView;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
TreeViewNode node = ASPxTreeView1.Nodes.Add();
node.Text = "Home";
node.Image.Url = "~/Images/Home.png";
node.Name = "Home page";
node.NavigateUrl = "http://www.devexpress.com/";
node.Target = "_blank";
node.ToolTip = "DevEx Home Page";
}
}
See Also