drkbl

Double buffered DataGridView

May 29th, 2021 (edited)
1,512
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.35 KB | None | 0 0
  1. // Set DataGridView to double buffered
  2. // replace DataGridViewControlName with actual name
  3. // Source: https://www.codeproject.com/tips/654101/double-buffering-a-datagridview
  4. typeof(DataGridView).InvokeMember("DoubleBuffered", BindingFlags.NonPublic |
  5. BindingFlags.Instance | BindingFlags.SetProperty, null,
  6. DataGridViewControlName, new object[] { true });
Add Comment
Please, Sign In to add comment