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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Column sorting

Thread ID:





36183 Oct 21,2005 04:21 PM UTC Oct 21,2005 04:53 PM UTC WinForms 1
Tags: GridControl
Iain Jolly
Asked On October 21, 2005 04:21 PM UTC

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

Administrator [Syncfusion]
Replied On 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)


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon