System.Web.UI.WebControls.TreeView Members

The members of System.Web.UI.WebControls.TreeView are listed below.

See Also: Inherited members from System.Web.UI.WebControls.HierarchicalDataBoundControl

Public Constructors

Initializes a new instance of the System.Web.UI.WebControls.TreeView class.

Public Properties

AutoGenerateDataBindingsbool.

Gets or sets a value indicating whether the System.Web.UI.WebControls.TreeView control automatically generates tree node bindings.

[read-only]
CheckedNodesTreeNodeCollection.

Gets a collection of System.Web.UI.WebControls.TreeNode objects that represent the nodes in the System.Web.UI.WebControls.TreeView control that display a selected check box.

CollapseImageToolTipstring.

Gets or sets the ToolTip for the image that is displayed for the collapsible node indicator.

CollapseImageUrlstring.

Gets or sets the URL to a custom image for the collapsible node indicator.

[read-only]
DataBindingsTreeNodeBindingCollection.

Gets a collection of System.Web.UI.WebControls.TreeNodeBinding objects that define the relationship between a data item and the node that it is binding to.

EnableClientScriptbool.

Gets or sets a value indicating whether the System.Web.UI.WebControls.TreeView control renders client-side script to handle expanding and collapsing events.

ExpandDepthint.

Gets or sets the number of levels that are expanded when a System.Web.UI.WebControls.TreeView control is displayed for the first time.

ExpandImageToolTipstring.

Gets or sets the ToolTip for the image that is displayed for the expandable node indicator.

ExpandImageUrlstring.

Gets or sets the URL to a custom image for the expandable node indicator.

[read-only]
HoverNodeStyleStyle.

Gets a reference to the System.Web.UI.WebControls.TreeNodeStyle object that allows you to set the appearance of a node when the mouse pointer is positioned over it.

ImageSetTreeViewImageSet.

Gets or sets the group of images to use for the System.Web.UI.WebControls.TreeView control.

[read-only]
LeafNodeStyleTreeNodeStyle.

Gets a reference to the System.Web.UI.WebControls.TreeNodeStyle object that allows you to set the appearance of leaf nodes.

[read-only]
LevelStylesTreeNodeStyleCollection.

Gets a collection of System.Web.UI.WebControls.Style objects that represent the node styles at the individual levels of the tree.

LineImagesFolderstring.

Gets or sets the path to a folder that contains the line images that are used to connect child nodes to parent nodes.

MaxDataBindDepthint.

Gets or sets the maximum number of tree levels to bind to the System.Web.UI.WebControls.TreeView control.

NodeIndentint.

Gets or sets the indentation amount (in pixels) for the child nodes of the System.Web.UI.WebControls.TreeView control.

[read-only]
NodesTreeNodeCollection.

Gets a collection of System.Web.UI.WebControls.TreeNode objects that represents the root nodes in the System.Web.UI.WebControls.TreeView control.

[read-only]
NodeStyleTreeNodeStyle.

Gets a reference to the System.Web.UI.WebControls.TreeNodeStyle object that allows you to set the default appearance of the nodes in the System.Web.UI.WebControls.TreeView control.

NodeWrapbool.

Gets or sets a value indicating whether text wraps in a node when the node runs out of space.

NoExpandImageUrlstring.

Gets or sets the URL to a custom image for the non-expandable node indicator.

[read-only]
ParentNodeStyleTreeNodeStyle.

Gets a reference to the System.Web.UI.WebControls.TreeNodeStyle object that allows you to set the appearance of parent nodes in the System.Web.UI.WebControls.TreeView control.

PathSeparatorchar.

Gets or sets the character that is used to delimit the node values that are specified by the TreeNode.ValuePath property.

PopulateNodesFromClientbool.

Gets or sets a value indicating whether node data is populated on demand from the client.

[read-only]
RootNodeStyleTreeNodeStyle.

Gets a reference to the System.Web.UI.WebControls.TreeNodeStyle object that allows you to set the appearance of the root node in the System.Web.UI.WebControls.TreeView control.

[read-only]
SelectedNodeTreeNode.

Gets a System.Web.UI.WebControls.TreeNode object that represents the selected node in the System.Web.UI.WebControls.TreeView control.

[read-only]
SelectedNodeStyleTreeNodeStyle.

Gets the System.Web.UI.WebControls.TreeNodeStyle object that controls the appearance of the selected node in the System.Web.UI.WebControls.TreeView control.

[read-only]
SelectedValuestring.

Gets the value of the selected node.

ShowCheckBoxesTreeNodeTypes.

Gets or sets a value indicating which node types will display a check box in the System.Web.UI.WebControls.TreeView control.

ShowExpandCollapsebool.

Gets or sets a value indicating whether expansion node indicators are displayed.

ShowLinesbool.

Gets or sets a value indicating whether lines connecting child nodes to parent nodes are displayed.

SkipLinkTextstring.

Gets or sets a value that is used to render alternate text for screen readers to skip the content for the control.

Targetstring.

Gets or sets the target window or frame in which to display the Web page content that is associated with a node.

override
Visiblebool.

Gets or sets a value indicating whether the control is rendered as UI on the page.

Protected Properties

Public Methods

CollapseAll()

Closes every node in the tree.

override
DataBind()

Calls the BaseDataBoundControl.DataBind method of the base class.

ExpandAll()

Opens every node in the tree.

FindNode(string) : TreeNode

Retrieves the System.Web.UI.WebControls.TreeNode object in the System.Web.UI.WebControls.TreeView control at the specified value path.

override
RenderBeginTag(System.Web.UI.HtmlTextWriter)

Renders the HTML opening tag of the control to the specified writer.

override
RenderEndTag(System.Web.UI.HtmlTextWriter)

Renders the HTML closing tag of the control to the specified writer.

Protected Methods

override
AddAttributesToRender(System.Web.UI.HtmlTextWriter)

Adds HTML attributes and styles that need to be rendered to the specified System.Web.UI.HtmlTextWriter control.

override
CreateControlCollection() : System.Web.UI.ControlCollection

Creates a collection to store child controls.

CreateNode() : TreeNode

Returns a new instance of the System.Web.UI.WebControls.TreeNode class. The TreeView.CreateNode is a helper method.

GetCallbackResult() : string

Returns the result of a callback event that targets a control.

LoadPostData(string, System.Collections.Specialized.NameValueCollection) : bool

Processes postback data for the System.Web.UI.WebControls.TreeView control.

override
LoadViewState(object)

Loads the previously saved view state of the System.Web.UI.WebControls.TreeView control.

override
OnInit(EventArgs)

Raises the System.Web.UI.Control.Init event.

override
OnPreRender(EventArgs)

Raises the System.Web.UI.Control.PreRender event.

OnSelectedNodeChanged(EventArgs)

Raises the TreeView.SelectedNodeChanged event of the System.Web.UI.WebControls.TreeView control.

OnTreeNodeCheckChanged(TreeNodeEventArgs)

Raises the TreeView.TreeNodeCheckChanged event of the System.Web.UI.WebControls.TreeView control.

OnTreeNodeCollapsed(TreeNodeEventArgs)

Raises the TreeView.TreeNodeCollapsed event of the System.Web.UI.WebControls.TreeView control.

OnTreeNodeDataBound(TreeNodeEventArgs)

Raises the TreeView.TreeNodeDataBound event of the System.Web.UI.WebControls.TreeView control.

OnTreeNodeExpanded(TreeNodeEventArgs)

Raises the TreeView.TreeNodeExpanded event of the System.Web.UI.WebControls.TreeView control.

OnTreeNodePopulate(TreeNodeEventArgs)

Raises the TreeView.TreeNodePopulate event of the System.Web.UI.WebControls.TreeView control.

override
PerformDataBinding()

Creates all the nodes based on the data source.

RaiseCallbackEvent(string)

Raises the callback event using the specified arguments.

RaisePostBackEvent(string)

Enables the System.Web.UI.WebControls.TreeView control to process an event that is raised when a form is posted to the server. The TreeView.RaisePostBackEvent(string) method is a helper method for the TreeView.System#Web#UI#ICallbackEventHandler#RaiseCallbackEvent(string) method.

RaisePostDataChangedEvent()

Signals the System.Web.UI.WebControls.TreeView control to notify the ASP.NET application that the state of the control has changed.

override
RenderContents(System.Web.UI.HtmlTextWriter)

Renders the nodes in the System.Web.UI.WebControls.TreeView control.

override
SaveViewState() : object

Saves the state of the System.Web.UI.WebControls.TreeView control.

SetNodeDataBound(TreeNode, bool)

Allows a derived class to set whether the specified System.Web.UI.WebControls.TreeNode control is data-bound.

SetNodeDataItem(TreeNode, object)

Allows a derived class to set the data item for the specified System.Web.UI.WebControls.TreeNode control.

SetNodeDataPath(TreeNode, string)

Allows a derived class to set the data path for the specified System.Web.UI.WebControls.TreeNode control.

override
TrackViewState()

Tracks view-state changes to the System.Web.UI.WebControls.TreeView control so that they can be stored in the System.Web.UI.StateBag object for the control. This System.Web.UI.StateBag is accessible through the System.Web.UI.Control.ViewState property.

Public Events

SelectedNodeChanged

Occurs when a node is selected in the System.Web.UI.WebControls.TreeView control.

TreeNodeCheckChanged

Occurs when a check box in the System.Web.UI.WebControls.TreeView control changes state between posts to the server.

TreeNodeCollapsed

Occurs when a node is collapsed in the System.Web.UI.WebControls.TreeView control.

TreeNodeDataBound

Occurs when a data item is bound to a node in the System.Web.UI.WebControls.TreeView control.

TreeNodeExpanded

Occurs when a node is expanded in the System.Web.UI.WebControls.TreeView control.

TreeNodePopulate

Occurs when a node with its TreeNode.PopulateOnDemand property set to true is expanded in the System.Web.UI.WebControls.TreeView control.

Explicitly Implemented Interface Members

System.Web.UI.ICallbackEventHandler.GetCallbackResult

Returns the result of a callback event that targets a control.

System.Web.UI.IPostBackDataHandler.LoadPostData

Processes postback data for the System.Web.UI.WebControls.TreeView control.

System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent

Raises the callback event using the specified arguments.

System.Web.UI.IPostBackEventHandler.RaisePostBackEvent

Enables the System.Web.UI.WebControls.TreeView control to process an event that is raised when a form is posted to the server.

System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent

Signals the System.Web.UI.WebControls.TreeView control to notify the ASP.NET application that the state of the control has changed.