System.Web.UI.WebControls.TreeNode.PopulateOnDemand Property

Gets or sets a value that indicates whether the node is populated dynamically.

Syntax

[System.ComponentModel.DefaultValue(false)]
public bool PopulateOnDemand { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Sometimes, it is not practical to statically predefine the tree structure due to data size or custom content that depends on user input. Because of this, the System.Web.UI.WebControls.TreeView control supports dynamic node population. When a node's TreeNode.PopulateOnDemand property is set to true, that node is populated at run time through a postback event when the node is expanded. To populate a node dynamically, an event-handling method that populates the node must be defined for the TreeView.TreeNodePopulate event.

Supported browsers can also take advantage of client-side node population. When enabled, this allows the System.Web.UI.WebControls.TreeView control to dynamically populate a node on the client when that node is expanded, which prevents the need to post back to the server. For more information on client-side node population, see TreeView.PopulateNodesFromClient.

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