Skip to main content
A newer version of this page is available. .
All docs
V20.2

TreeViewControl.ExpandStateFieldName Property

Gets or sets the field name in a data source that specifies expanded nodes. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.2.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Grid.Core, DevExpress.Wpf.Grid.Core

Declaration

public string ExpandStateFieldName { get; set; }

Property Value

Type Description
String

The field name in a data source that specifies expanded nodes.

Remarks

<dxg:TreeViewControl ItemsSource="{Binding EmployeeDepartments}" 
                     ChildNodesPath="Employees" 
                     TreeViewFieldName="Name"
                     ExpandStateFieldName="Expanded"/>
public class EmployeeDepartment {
    public string Name { get; set; }
    public ObservableCollection<Employee> Employees { get; }
    public bool Expanded { get; set; }
}
See Also