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

Current row and selection behavior when databound grid is re-sorted

Thread ID:





10655 Feb 9,2004 03:48 PM UTC Feb 11,2004 09:56 AM UTC WinForms 3
Tags: GridControl
Gene Gorokhovsky
Asked On February 9, 2004 03:48 PM UTC

I am using GDBG User has multi-select enabled. When I sort by clicking on a column header 1) all selections disappear without even firing Model.SelectionChanging (see GridDataBoundGrid.SortField) 2) current row is left at the same grid row index, it does not move to the new row location I understand that keeping track of resorted multiple selection is a hassle.For me it would be sufficient if events were fired before and after sort. 1) sort about to happen event to know that I have to save currently selected records 2) sort completed event where I could restore the multi-selection as needed. In addition selectionchanging definetely should be called when selection is being cleared by sort. I tried to open DirectTrac, but apparently web interface is broken.

Administrator [Syncfusion]
Replied On February 9, 2004 07:13 PM UTC

Hi Gene, I have updated your support incident regarding this issue. Please log on to the Direct-Trac to see the reply. Regards, Jay N

Alexander Arlievsky
Replied On February 11, 2004 08:42 AM UTC

Hi, I have the same problem (using What is the solution ?

Administrator [Syncfusion]
Replied On February 11, 2004 09:56 AM UTC

One way to do this is to handle the sort yourself, saving what you want saved before the sort, and then restoring things after the sort. You can do this by turning off the default sorting, catching the doubleclick event, and doing the work in your handler. Here is a sample. 9172_2810.zip Another technique is to derive the grid and override SortColumn, and do things there like saving information, calling the baseclass, and then restoring the save information.


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

Live Chat Icon For mobile
Live Chat Icon