New to Telerik UI for WPFStart a free 30-day trial

Sorting with DataProvider

Updated on Sep 15, 2025

When RadVirtualGrid populates its data through the DataProvider mechanism, the sorting operation will be handled out-of-the-box. By default, the sorting of the control is enabled. The user can sort the data through the UI by clicking the column headers. Each click on a given column header will go to the consequent sorting state from one of the following ones: Ascending, Descending and No Sort.

The sorting of RadVirtualGrid can be disabled by setting the IsSortable property to False.

Figure 1: Sorting RadVirtualGrid through the UI

Opening the FilteringControl of RadVirtualGrid

Sorting through ColumnSortDescriptor

The ColumnSortDescriptor of a given column can be fetched through the GetSortDescriptorForColumn method of RadVirtualGrid by providing the index of the needed column.

Example 1: Getting the ColumnSortDescriptor of a column

C#
	var sortDescriptor = this.VirtualGrid.GetSortDescriptorForColumn(0);

Through the ColumnSortDescriptor, the sorting state can be set by manipulating its SortDirection property.

In order the UI to be updated accordingly, the IsActive property of the given SortDescriptor needs to be set to True.

Example 2: Setting the SortDirection property

C#
	var sortDescriptor = this.VirtualGrid.GetSortDescriptorForColumn(0);
	sortDescriptor.SortDirection = System.ComponentModel.ListSortDirection.Ascending;

See Also