标签:
1 class DoubleBufferDataGridView : DataGridView 2 { 3 public DoubleBufferDataGridView() 4 { 5 SetStyle(ControlStyles.DoubleBuffer | ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true); 6 //UpdateStatus.Continue; 7 UpdateStyles(); 8 } 9 }
调用方法:
在InitializeComponent()函数中
// this.dataGridView1 = new System.Windows.Forms.DataGridView(); 屏蔽掉,添加下面这句即可
this.dataGridView1 = new DoubleBufferListView();
标签:
原文地址:http://www.cnblogs.com/caochunsheng/p/5495296.html