System.Web.UI.WebControls Namespace TreeView Class
.NET Framework version 2.0
Sets or retrieves the indentation amount ( in pixels ) for the child nodes in a TreeView control.
Inline |
<asp:treeview nodeindent = intValue ... > |
Script |
TreeView.NodeIndent [ = intValue ] |
intValue |
The amount of space (in pixels) between a child node's left edge and its parent node's left edge. |
The property is read/write with a default value of 20.
Use the NodeIndent property to control the amount of spacing between the left edge of a child node and the left edge of its parent node.
NOTE: The NodeIndent property affects every child node in the TreeView control. It is not possible to control the indentation amount of each node individually.
The following example demonstrates how to use the NodeIndent property to control the indentation of child nodes in a TreeView control.
<asp:treeview id = "myTreeView" runat = "server"
datasourceid = "siteMap"
nodeindent=0
expanddepth=1>
<levelstyles>
...
</levelstyles>
</asp:treeview>
<asp:sitemapdatasource id = "siteMap" runat = "server" />
Show me
TreeView Members