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

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.

RadDataGrid allows sorting through the UI(by click/tap on the Column Header) and also programmatic sorting which can be achieved through using the RadDataGrid.SortDescriptors property by adding SortDescriptor(s).

Disable Sorting

The sorting through the UI can be disabled on the RadDataGrid level by setting its UserSortMode property. It can also be disabled on the column level by setting the CanUserSort property of the respective column.

Example 1: Setting the UserSortMode property

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

Example 2: Setting the CanUserSort property

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

Sorting Options

RadDataGrid provides two ways of sorting:

In this article
Not finding the help you need?