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.
Syncfusion Feedback

Capturing event after sort on DataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

12189 Mar 23,2004 04:55 PM UTC Mar 24,2004 02:09 PM UTC Windows Forms 5
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 23, 2004 04:55 PM UTC

Hi, Is there a way to capture the sort event so I can select the first row in the grid after it is sorted? I really need this functionality. Thanks Andy J

Administrator [Syncfusion]
Replied On March 23, 2004 05:34 PM UTC

You can catch the grid.Model.ClipboardPasted event. It is discussed in this forum thread. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=12155

Administrator [Syncfusion]
Replied On March 23, 2004 05:52 PM UTC

Umm I"m not pasting anything, I need to capture the sort event on a databound grid... I''m not using the clipboard for anything... Sorry for the confusion Andy J >Hi, > >Is there a way to capture the sort event so I can select the first row in the grid after it is sorted? I really need this functionality. > >Thanks > >Andy J

Administrator [Syncfusion]
Replied On March 23, 2004 07:14 PM UTC

I am sorry, I misread your request. Currently, there are no events fired related to sorting. But ycan derive the GridDataBoundGrid, and override the SortColumns method. In your override, you could raise a presort event, call the baseclass, and then raise a postsort event. If you do not want to add your own events, you could add a public field or property bool inSort, and set this property before the call to the baseclass, and reset it after the call to the baseclass. You could then test this flag to know when you are sorting.

Administrator [Syncfusion]
Replied On March 23, 2004 07:15 PM UTC

I am sorry, I misread your request. Currently, there are no events fired related to sorting. But ycan derive the GridDataBoundGrid, and override the SortColumns method. In your override, you could raise a presort event, call the baseclass, and then raise a postsort event. If you do not want to add your own events, you could add a public field or property bool inSort, and set this property before the call to the baseclass, and reset it after the call to the baseclass. You could then test this flag to know when you are sorting.

Jose Luis Melo
Replied On March 24, 2004 02:09 PM UTC

Hi Andy, You can do it like I did. You select the sort event with only only click... In the grids''s properties: GridDataBoundGrid.SortBehavior = Syncfusion.Windows.Forms.Grid.GridSortBehavior.SingleClick And in the GridDataBoundGrid.DoubleCLick event select the first or any other row: GridDataBoundGrid.ForceCurrentCellMoveTo = True GridDataBoundGrid.CurrentCell.MoveTo( row, column) This double click event will always happen after the first click sort event. Jose Melo

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.

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

;