Hi everyone,
I’m encountering an issue with the DataGridView
in my VB.NET app. When scrolling quickly in fullscreen mode, some cells get duplicated. The faster I scroll, the worse the issue becomes. Interestingly, this does not happen when the window is not maximized — it only occurs when the window is in fullscreen mode, and the effect is stronger the larger the window.
Here’s what I’ve tried:
- DoubleBuffering is enabled.
- .SuspendLayout() and .ResumeLayout() are used before and after filling the DataGridView, respectively.
- MultiSelect is set to
False
.
- AutoSize for rows and columns is disabled.
- I’ve asked ChatGPT for suggestions (and tested multiple approaches).
The issue:
- Fast scrolling causes whole rows to duplicate. This is a minor issue since it doesn’t affect functionality.
- Selected cells get dragged with the scroll, and for a couple of seconds, the grid becomes unresponsive. The grid keeps scrolling even after I stop, and then the duplication disappears.
- This issue happens specifically when scrolling quickly, and it affects the interface for a few seconds. The screen becomes unresponsive during that time.
GIF demonstration:
Here’s a GIF showing the problem. You can see that even after I stop scrolling, the grid continues to scroll. A selected cell is duplicated, and for a few seconds, I can't control anything. The scrolling continues, and after a brief delay, the duplication disappears.