I am using the standard .Net 2.0 DataGridView with sort mode of automatic on the column. It is very very slow (which should probably be another question on how to speed it up) but I can’t seem to find an event or combination of events that will maintain a WaitCursor while this sort operation is being performed.
Ideas?
Hook ‘MouseDown’ event, check with ‘HitTest’ method where user clicked. If user clicked on the column header set ‘Cursor.Current = Cursors.Wait’ and set some flag ‘isSorting’ to true.
Hook ‘MouseUp’ event, check if ‘isSorting’ flag true, then set ‘Cursor.Current = Cursors.Default’.
EDIT: Use ‘Sorted’ event instead of ‘MouseUp’. The ‘MouseUp’ is funtionaly, but the ‘Sorted’ is ‘cleaner’ solution.