DxTreeListDataColumn.SortOrder Property
Specifies the column’s sort order (ascending or descending).
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue(TreeListColumnSortOrder.None)]
[Parameter]
public TreeListColumnSortOrder SortOrder { get; set; }
Property Value
Type | Default | Description |
---|---|---|
TreeListColumnSortOrder | None | An enumeration value. |
Available values:
Name | Description |
---|---|
None | The TreeList sorts column data in ascending order. |
Ascending | The TreeList sorts column data in ascending order. |
Descending | The TreeList sorts column data in descending order. |
Remarks
When you specify a column’s SortIndex property, the TreeList sorts column data in ascending order. Use the SortOrder
property to change the sort order.
@inject EmployeeTaskService EmployeeTaskService
<DxTreeList Data="TreeListData" KeyFieldName="Id" ParentKeyFieldName="ParentId">
<Columns>
<DxTreeListDataColumn FieldName="Name" Caption="Task" SortIndex="1" />
<DxTreeListDataColumn FieldName="EmployeeName" />
<DxTreeListDataColumn FieldName="StartDate" />
<DxTreeListDataColumn FieldName="DueDate"
SortIndex="0"
SortOrder="TreeListColumnSortOrder.Descending" />
</Columns>
</DxTreeList>
@code {
List<EmployeeTask> TreeListData { get; set; }
protected override void OnInitialized() {
TreeListData = EmployeeTaskService.GenerateData();
}
}
For more information about data sorting in the TreeList component, refer to the following topic: Sort Data in Blazor TreeList.
Implements
See Also