ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods

DoubleBuffered

fast scroll for datagridview

Source

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);
}

Example

this.DoubleBuffered(true);

Author: unknow

Submitted on: 15 dec. 2020

Language: csharp

Type: DataGridView

Views: 3451