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" 
                      AutoGenerateColumns="False" /> 

Set the CanUserSort Property

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

Sorting Options

The DataGrid provides the following ways of sorting:

In this article
Not finding the help you need?