wpf-devexpress-dot-xpf-dot-grid-dot-columnbase-fae2d190.md
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
public ListSortDirection DefaultSortOrder { get; set; }
Public Property DefaultSortOrder As ListSortDirection
| Type | Description |
|---|---|
| ListSortDirection |
The initial sort order.
|
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
<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
<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
<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
<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
<dxg:GridColumn FieldName="Votes" IsSmart="True" Width="0.5*"
AllowSorting="True" DefaultSortOrder="Descending"
AllowedBinaryFilters="GreaterOrEqual" FilterPopupMode="Excel" AllowEditing="true"/>
See Also