DataGridView Scrolling Event (and ScrollEventType.EndScroll)

When sending an event, DataGridView.Scrollyou can check if this was the end of the scroll (when dragging the scroll bar with the mouse, this is possible when the mouse button is released).

The problem is that this never happens. e.TypeneverScrollEventType.EndScroll

What happened to this? How can I do something only when scrolling is complete?

    private void dataGridView_Scroll(object sender, ScrollEventArgs e)
    {
        if (e.Type == ScrollEventType.EndScroll)
        {
            // ...      
        }
    }
+5
source share
1 answer

Well, it looks like this event is just being tapped.

You can snap the DGV private scroll bar objects (via reflection) and handle their events, where it is ScrollEventType.EndScrolldisplayed as expected.

. this , .

+5

All Articles