System.Web.UI.WebControls.TreeView.MaxDataBindDepth Property

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

Syntax

[System.ComponentModel.DefaultValue(-1)]
public int MaxDataBindDepth { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

When binding the System.Web.UI.WebControls.TreeView control to a data source, use the TreeView.MaxDataBindDepth property to limit the number of tree levels to bind to the control. For example, setting this property to 2 binds only the root node and any nodes that are immediately under the root node to the System.Web.UI.WebControls.TreeView control. All remaining nodes in the data source are ignored.

Note:

A malicious user can create a callback request and get data for the nodes of the System.Web.UI.WebControls.TreeView control that the page developer is not displaying. Therefore, security of the data must be implemented by the data source. Do not use the TreeView.MaxDataBindDepth property to hide data.

The value of this property is stored in view state.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0