Recently, we moved to win7.
The datagridview refresh very slow when we scroll the scrollbar.
To solve this issue, do this:
public static class ExtensionMethods { public static void DoubleBuffered(this DataGridView dgv, bool setting) { Type dgvType = dgv.GetType(); PropertyInfo pi = dgvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic); pi.SetValue(dgv, setting, null); } }
dataGridView1.DoubleBuffered(true);
--
Feng