How to prevent DataGridView from flickering |Blinking

How to prevent DataGridView from flickering |Blinking

Added by Sixth Sense updated on Wednesday, March 7, 2018


Flickering is common problem in windows forms DataGridView when we use huge data to display. Overcome this problem is tricky part which we will discuss in this small snippet.

By Sub Class:

One possible solution is to use custom control by sub classing and assign DoubleBuffered property to true in constructor as shown below.

public class MyDataGridView : DataGridView
	public MyDataGridView()
        DoubleBuffered = true;

By Reflection:

Another solution is to make extension method as shown below.

public static void DoubleBuffered(this DataGridView dgv, bool bvalue)
	Type dgvType = dgv.GetType();
    PropertyInfo pi = dgvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);
    pi.SetValue(dgv, bvalue, null);


Later on we can use this extension method as shown below.


To disable double buffering



32 Tutorials
27 Snippets
6 Products


Contact Us

Contact us

Stay Connected