A newer version of this page is available. Switch to the current version.

TreeListExtension.BindToVirtualData(TreeListVirtualModeCreateChildrenMethod, TreeListVirtualModeNodeCreatingMethod) Method

Allows creation of treelist nodes on demand (virtual mode).

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v18.2.dll

Declaration

public TreeListExtension BindToVirtualData(
    TreeListVirtualModeCreateChildrenMethod createChildrenMethod,
    TreeListVirtualModeNodeCreatingMethod nodeCreatingMethod
)
Public Function BindToVirtualData(
    createChildrenMethod As TreeListVirtualModeCreateChildrenMethod,
    nodeCreatingMethod As TreeListVirtualModeNodeCreatingMethod
) As TreeListExtension

Parameters

Name Type Description
createChildrenMethod TreeListVirtualModeCreateChildrenMethod

A delegate method of the TreeListVirtualModeCreateChildrenMethod type that enables you to create a list of business objects that correspond to the child nodes owned by the processed node.

nodeCreatingMethod TreeListVirtualModeNodeCreatingMethod

A delegate method of the TreeListVirtualModeNodeCreatingMethod type that enables you to specify the node's key value and cell values.

Returns

Type Description
TreeListExtension

A TreeListExtension object that is the TreeList.

Remarks

In addition to bound and unbound modes, the TreeList extension can operate in Virtual Mode, which greatly reduces both the server load and start-up time when working with complex or dynamically created data. In virtual mode, a tree is created on demand. In this instance, child nodes are created and initialized when their parent node is expanded.

To implement a virtual mode for the TreeList extension, a specifically parameterized BindToVirtualData method can be used. The method's parameters refer to delegate methods that can be declared as static methods within a model class. Within the first delegate method, create a list of business objects that correspond to the child nodes owned by the processed node. The second one enables you to specify the node's key value and cell values.

See Also