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.
Unfortunately, activation email could not send to your email. Please try again.

Column sorting

Thread ID:

Created:

Updated:

Platform:

Replies:

36183 Oct 21,2005 12:21 PM Oct 21,2005 12:53 PM Windows Forms 1
loading
Tags: GridControl
Iain Jolly
Asked On October 21, 2005 12:21 PM

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 12:53 PM

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)

CONFIRMATION

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.

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.

;