WaitCursor for sorting in a DataGridView

I am using standard. Data 2.0 DataGridView with automatic sorting mode in the column. This is very very slow (probably this should be another question on how to speed it up), but I cannot find an event or combination of events that WaitCursor will support during this sorting operation.

Ideas?

+3
source share
1 answer

Capture the MouseDown event, check using the HitTest method, where the user clicked. If the user clicked on the column heading, set "Cursor.Current = Cursors.Wait" and set the "isSorting" flag to true.

"MouseUp" , "isSorting" true, "Cursor.Current = Cursors.Default".

EDIT: "" "MouseUp" . "MouseUp" funtionaly, "Sorted" " " .

+5

Source: https://habr.com/ru/post/1699420/


All Articles