asp.net.ph

TreeView.ShowExpandCollapse Property

System.Web.UI.WebControls Namespace   TreeView Class


.NET Framework version 2.0

Sets or retireves a value indicating whether expansion node indicators are displayed in a TreeView control.

Syntax


Inline <asp:treeview showexpandcollapse = true | false ... >
Script TreeView.ShowExpandCollapse [ = true | false ]

Property Value

This property accepts or returns only a boolean value: true to show the expansion node indicators; otherwise, false. Default value is true.

Remarks

Use the ShowExpandCollapse property to specify whether expansion node indicators are displayed in a TreeView control. Expansion node indicators are used to show whether a node is expanded, collapsed, or non-expandable.

When the ShowExpandCollapse property is set to true, the TreeView control displays a plus sign ( + ) or minus sign ( - ) or a placeholder image next to a node to indicate whether the node is expandable, collapsible, or non-expandable, respectively. You can specify custom images by first setting the ImageSet property to Custom, and then setting the ExpandImageUrl, and CollapseImageUrl, and NoExpandImageUrl properties to the URLs of the custom images. If no images are specified, the default images are used.

Example

The following example demonstrates how to use the ShowExpandCollapse property to hide the expansion node icons.

<asp:treeview id = "myTreeView" runat = "server"
   expanddepth=1
   showexpandcollapse=false>

   <levelstyles>
      ...
   </levelstyles>
</asp:treeview>
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