TelerikDeveloper.com

TelerikDeveloper.com

sgray128 4/15/2016 11:11:09 AM

Sorting the Winforms Grid programmatically

This short code example shows how to programmatically sort a Winforms RadGrid

 


Dim descriptor1 As New Telerik.WinControls.Data.SortDescriptor()
descriptor1.PropertyName = "vchrSubdivisionName"
descriptor1.Direction = System.ComponentModel.ListSortDirection.Ascending
Me.RadGridView1.MasterTemplate.SortDescriptors.Add(descriptor1)
 
Dim descriptor2 As New Telerik.WinControls.Data.SortDescriptor()
descriptor2.PropertyName = "vchrLotNumber"
descriptor2.Direction = System.ComponentModel.ListSortDirection.Ascending
Me.RadGridView1.MasterTemplate.SortDescriptors.Add(descriptor2)