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

GDBD Sort

Hi,
I would like to have the same row (data) selected after a sort action.
Is there a way to do that ?

Thanks

Simon.

3 Replies

AD Administrator Syncfusion Team March 5, 2007 03:42 PM UTC

Hi Simon,

There is no built-in support for this. If you want to keep selection on current row after the sort changes in DataBoundGrid, you would have to derive the GridDataBound control and override the SortColumn Method to acheive this. Please refer to the attached sample for more details and let me know if this helps.

http://websamples.syncfusion.com/samples/Grid.Windows/GDBGKeepSelectionOnSort/main.htm

Best regards,
Haneef


SK Simon Kakon March 5, 2007 04:57 PM UTC

Thanks for your response.
But your sample keeps the index.
In my case, I would like to to have the same datarow (not the row index) selected after sort action.


>Hi Simon,

There is no built-in support for this. If you want to keep selection on current row after the sort changes in DataBoundGrid, you would have to derive the GridDataBound control and override the SortColumn Method to acheive this. Please refer to the attached sample for more details and let me know if this helps.

http://websamples.syncfusion.com/samples/Grid.Windows/GDBGKeepSelectionOnSort/main.htm

Best regards,
Haneef


AD Administrator Syncfusion Team March 5, 2007 11:21 PM UTC

Hi Simon,

Please try the attached sample in below link and let me know if this helps.
http://websamples.syncfusion.com/samples/Grid.Windows/F57458/main.htm

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon