AD
Administrator
Syncfusion Team
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
AD
Administrator
Syncfusion Team
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
AD
Administrator
Syncfusion Team
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.
AD
Administrator
Syncfusion Team
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.
JL
Jose Luis Melo
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