Back to Devexpress

TreeListColumn.FieldNameSort Property

windowsforms-devexpress-dot-xtratreelist-dot-columns-dot-treelistcolumn-b311774c.md

latest2.6 KB
Original Source

TreeListColumn.FieldNameSort Property

Gets or sets by what data field this column should sort and filter its data.

Namespace : DevExpress.XtraTreeList.Columns

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
[DefaultValue("")]
[DXCategory("Data")]
[XtraSerializableProperty]
public string FieldNameSort { get; set; }
vb
<DXCategory("Data")>
<DefaultValue("")>
<XtraSerializableProperty>
Public Property FieldNameSort As String

Property Value

TypeDefaultDescription
StringString.Empty

A String value that specifies the name of a data field which should be used by this column to perform sorting and/or filtering.

|

Remarks

By default, any TreeListColumn sorts and filters TreeList data by the values this column displays. By using the FieldNameSort property, you can change this behavior and force a column to sort and filter data by another data field. The animation below illustrates the Tree List with an empty unbound column. A user can click this column’s header to apply data sorting by a data field associated with the first column.

To be able to view values of this custom FieldNameSort field within a column’s filter dropdown menu, set the column’s TreeListOptionsColumnFilter.FilterBySortField property to DefaultBoolean.True.

See Also

FilterBySortField

TreeListColumn Class

TreeListColumn Members

DevExpress.XtraTreeList.Columns Namespace