Edit this page

Programmatic Sorting

Programmatic sorting is performed by adding a SortDescriptor object to the SortDescriptors collection of the control.

For example:

SortDescriptor sd = new SortDescriptor();
sd.Member = "ContactTitle";
sd.SortDirection = ListSortDirection.Descending;
this.customersDataSource.SortDescriptors.Add(sd);
Dim sd As New SortDescriptor()
sd.Member = "ContactTitle"
sd.SortDirection = ListSortDirection.Descending
Me.customersDataSource.SortDescriptors.Add(sd)

Once the application is loaded, the RadGridView will be visualized as follows:

Adding several SortDescriptors to the collection will perform the sorting in the respective order.

Was this article helpful? Yes No

Give article feedback

Tell us how we can improve this article

Dummy