asp.net.ph

TreeView.NodeIndent Property

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.

Syntax


Inline <asp:treeview nodeindent = intValue ... >
Script TreeView.NodeIndent [ = intValue ]

Property Value


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.

Remarks

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.

Example

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 

See Also

TreeView Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph