DxTreeViewBase.Data Property

Specifies a data source.

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.dll

Declaration

[Parameter]
public IEnumerable Data { get; set; }

Property Value

Type Description
IEnumerable

A data source.

Remarks

The DxTreeView component supports binding to hierarchical data structures. A bound DxTreeView creates a node for each data item.

Use the Data option to specify a data source.

Note

To bind DxTreeView to a hierarchical data structure you should specify the Data and ChildrenExpression properties.

<DxTreeView Data="@ChemicalElements.Groups"
    TextExpression="@(dataItem => ((ChemicalElementGroup)dataItem).Name)"
    ChildrenExpression="@(dataItem => ((ChemicalElementGroup)dataItem).Groups)">
</DxTreeView>

Online Demo

TreeView - Binding to Hierarchical Data

See Also