Back to Devexpress

ColumnBase.DefaultSortOrder Property

wpf-devexpress-dot-xpf-dot-grid-dot-columnbase-fae2d190.md

latest4.1 KB
Original Source

ColumnBase.DefaultSortOrder Property

Gets or sets the initial sort order.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public ListSortDirection DefaultSortOrder { get; set; }
vb
Public Property DefaultSortOrder As ListSortDirection

Property Value

TypeDescription
ListSortDirection

The initial sort order.

|

Remarks

An end-user can click a column’s header to sort data against the column or to change the column’s sort order. Use the DefaultSortOrder property to specify the initial sort order.

The following code snippets (auto-collected from DevExpress Examples) contain references to the DefaultSortOrder property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-data-grid-use-skip-tokens-to-optimize-paging-EF/CS/MainWindow.xaml#L17

xml
<dxg:GridColumn FieldName="Created" IsSmart="True" Width="*"
                AllowSorting="True" DefaultSortOrder="Descending"
                AllowedDateTimeFilters="SingleDateRange" FilterPopupMode="DateSmart">

wpf-data-grid-bind-to-custom-service-with-restrictions/CS/MainWindow.xaml#L23

xml
<dxg:GridColumn FieldName="Created" IsSmart="True" Width="*"
                AllowSorting="True" DefaultSortOrder="Descending"
                AllowedDateTimeFilters="SingleDateRange" FilterPopupMode="DateSmart"

wpf-data-grid-bind-to-pagedasyncsource/CS/PagedAsyncSourceSample/MainWindow.xaml#L24

xml
<dxg:GridColumn FieldName="Votes" IsSmart="True" Width="0.5*"
                AllowSorting="True" DefaultSortOrder="Descending"
                AllowedBinaryFilters="GreaterOrEqual" FilterPopupMode="Excel"/>

wpf-data-grid-bind-to-infiniteasyncsource/CS/InfiniteAsyncSourceSample/MainWindow.xaml#L28

xml
<dxg:GridColumn FieldName="Votes" IsSmart="True" AllowEditing="True" Width="0.5*"
                AllowSorting="True" DefaultSortOrder="Descending"
                AllowedBinaryFilters="GreaterOrEqual" FilterPopupMode="Excel"/>

how-to-bind-to-grpc/CS/InfiniteAsyncSource.GRPC/MainWindow.xaml#L44

xml
<dxg:GridColumn FieldName="Votes" IsSmart="True" Width="0.5*"
                        AllowSorting="True" DefaultSortOrder="Descending"
                        AllowedBinaryFilters="GreaterOrEqual" FilterPopupMode="Excel" AllowEditing="true"/>

See Also

ColumnBase Class

ColumnBase Members

DevExpress.Xpf.Grid Namespace