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

Keep selected row after sorting

Thread ID:





34169 Sep 5,2005 10:58 AM UTC Oct 26,2005 12:11 AM UTC WinForms 3
Tags: GridControl
Matthias Wehinger
Asked On September 5, 2005 10:58 AM UTC

Hello, is there an easy way to keep the selected record of a GridDataBoundGrid selected after sorting a column? The default sort behaviour is that the selection stays at the row number but not at the previous selected record. If it is not possible -> Is there an event fired after the grid finished the sort operation? Thanks, Matthias

Administrator [Syncfusion]
Replied On September 5, 2005 11:37 AM UTC

Here is a forum thread on this. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=21991

Administrator [Syncfusion]
Replied On October 25, 2005 11:34 PM UTC

Hi Clay, I am having the same problem. I am able to move to the correct row after sorting, but the selection will not persist. I have tried adding a selection back using: this.grid.Selections.Add(GridRangeInfo.Row(i)); The selection is being added in the DrawCell event after a sort has been performed but then is getting cleared out again. I can see the selection flicker, but it does not stay. Are there any events that fire after DrawCell that could clear this out? Thanks in advance JH

Administrator [Syncfusion]
Replied On October 26, 2005 12:11 AM UTC

You should try adding the selection back in your SortColumn override the call to the baseclass. DrawCell is hit hit constantly, and cell by cell. Calling Selections.Add in DrawCell is not normally something you would do.


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