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

Sorting a gdbg and selected record

Thread ID:





38008 Dec 4,2005 03:39 PM UTC Dec 5,2005 07:12 PM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On December 4, 2005 03:39 PM UTC

I have a GDBG with DataSource = a Dataview and 2 GridBoundColumns. If I sort the grid (by clicking a column) the sorting is performed, but the selected rowindex stays the same. If the actual selected row is rowindex 1, the selected row after sorting should be the last row. But it''s still rowindex 1, so that another record is now selected. I want, that the same record is selected after sorting. Greetings Falk

Administrator [Syncfusion]
Replied On December 4, 2005 04:42 PM UTC

Here is a forum thread that discusses one way to handle this. http://www.syncfusion.com/Support/forums/message.aspx?MessageID=10655

Administrator [Syncfusion]
Replied On December 5, 2005 05:46 PM UTC

I think this should be implemented in the grid - so that there is no need to make a workaround. Could this be a feature request? What''s your opinion? Greetings Falk

Administrator [Syncfusion]
Replied On December 5, 2005 07:12 PM UTC

If you use a GridGroupingControl, the current record will be persisted through a sort. The problem with adding this supportto a GridDataDataBound is a data neutral manner is performance. In general, locating the moved currently selected item would require looping through all items in the datasource and this could be a huge number. The GridGroupingControl can easily find the moved items because of its datastructures, but the GridDataboundGrid cannot. You only the other hand, might have special knowledge of your datasource that would let you use something like DataView.Find to efficiently locate the moved item. That is why we have left this up to the user in a GridDataBoundGrid so far.


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