wpf-devexpress-dot-xpf-dot-grid-dot-treelistview-a187ad93.md
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.v25.2.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public string ExpandStateFieldName { get; set; }
Public Property ExpandStateFieldName As String
| Type | Description |
|---|---|
| String |
A name of the data field that specifies which nodes are expanded.
|
<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; }
}
Public Class Employee
Public Property ID As Integer
Public Property ParentID As Integer
Public Property Name As String
Public Property Position As String
Public Property Department As String
Public Property Expanded As Boolean
End Class
See Also