System.Web.UI.WebControls Namespace TreeView Class
.NET Framework version 2.0
Sets or retireves a value indicating whether lines connecting child nodes to parent nodes are displayed in a TreeView control.
Inline |
<asp:treeview showlines = true | false ... > |
Script |
TreeView.ShowLines [ = true | false ] |
This property accepts or returns only a boolean value: true to display lines connecting nodes; otherwise, false. Default value is false.
Use the ShowLines property to specify whether the lines that are connecting child nodes to parent nodes are displayed in a TreeView control.
When this property is set to true, the TreeView control searches the Web-accessible folder that is specified by the LineImagesFolder property for the line images.
NOTE: If the LineImagesFolder property is not set, the TreeView control will use the built-in, default images ( 20 x 20 pixels ).
The following example demonstrates how to use the ShowLines property to display lines connecting nodes in the TreeView control. For this example to work, you should have a set of line images stored in the appopriate folder.
<asp:treeview id = "myTreeView" runat = "server"
expanddepth=1
nodestyle-horizontalpadding=3
lineimagesfolder = "~/shared/images/lines"
showlines
onTreeNodePopulate = "PopulateNode">
<nodes>
<asp:treenode text = "aspxtreme" populateondemand />
</nodes>
</asp:treeview>
Show me
TreeView Members