RadControls for WinForms

Sorting is possible in two ways either programmatically by adding the appropriate SortDescriptor to the SortDescriptors collection of RadListView, or by enabling the user to sort by clicking a column header in DetailsView.

Enabling sorting on header click is done by setting both EnableSorting and EnableColumnSort property to true.

Copy[C#] Enable column sorting
radListView1.EnableSorting = true;
radListView1.EnableColumnSort = true;
Copy[VB.NET] Enable column sorting
RadListView1.EnableColumnSort = True
RadListView1.EnableSorting = True

The following code demonstrates how to add SortDescriptor to RadListView:

Copy[C#] Adding SortDescriptors
radListView1.EnableSorting = true;
SortDescriptor sort = new SortDescriptor("Free Space", ListSortDirection.Ascending);
radListView1.SortDescriptors.Add(sort);
Copy[VB.NET] Adding SortDescriptors
RadListView1.EnableSorting = True
Dim sort = New SortDescriptor("Free Space", ListSortDirection.Ascending)
RadListView1.SortDescriptors.Add(sort)

Here is the sorted data:

listview-features-sorting