New to Telerik UI for WinUI? Download free 30-day trial

Sorting Overview

The RadGridView provides you with a built-in sorting functionality, which allows the user to easily sort the data by one or several columns.

The DataGrid allows sorting through the UI by clicking or tapping the column header and also programmatic sorting, which can be achieved through the RadDataGrid.SortDescriptors property by adding SortDescriptor(s).

Disabling Sorting

You can disable sorting through the UI on the DataGrid level by setting its UserSortMode property. The feature can also be disabled on the column level by setting the CanUserSort property of the respective column.

Set the UserSortMode Property

<Grid xmlns:grid="using:Telerik.UI.Xaml.Controls.Grid"> 
    <grid:RadDataGrid x:Name="DataGrid" 
                      UserSortMode="None" 
                      AutoGenerateColumns="False" /> 
</Grid> 

Set the CanUserSort Property

<grid:RadDataGrid.Columns> 
    <grid:DataGridTextColumn PropertyName="Country" CanUserSort="False"/> 
</grid:RadDataGrid.Columns> 

Sorting Options

The DataGrid provides the following ways of sorting:

In this article
Not finding the help you need?