We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Column sorting

Hi, How can I determine via code what the current column that the datagrid is sorted on. Thanks Iain

1 Reply

AD Administrator Syncfusion Team October 21, 2005 04:53 PM UTC

Try this code: Dim cm As CurrencyManager = CType(Me.BindingContext(Me.GridDataBoundGrid1.DataSource, Me.GridDataBoundGrid1.DataMember), CurrencyManager) Dim ibl As IBindingList = CType(cm.List, IBindingList) Dim sortDirection As ListSortDirection = ibl.SortDirection Dim pd As PropertyDescriptor = ibl.SortProperty Dim colName As String = pd.Name Console.WriteLine(sortDirection.ToString() + " " + colName)

Loader.
Live Chat Icon For mobile
Up arrow icon