Skip to main content
A newer version of this page is available. .

TreeListView.ExpandStateFieldName Property

Gets or sets the name of the data field within the items source that determines which nodes are expanded.

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

A name of the data field that specifies which nodes are expanded.

Remarks

<dxg:GridControl ItemsSource="{Binding Employees}">
    <dxg:GridControl.View>
        <dxg:TreeListView KeyFieldName="ID" 
                          ParentFieldName="ParentID" 
                          ExpandStateFieldName="Expanded"/>
    </dxg:GridControl.View>
    <!-- columns -->
</dxg:GridControl>
public class Employee {
    public int ID { get; set; }
    public int ParentID { get; set; }
    public string Name { get; set; }
    public string Position { get; set; }
    public string Department { get; set; }
    public bool Expanded { get; set; }
}
See Also