Removed double buffering.
This commit is contained in:
parent
235d0acede
commit
d770109d86
@ -38,19 +38,8 @@ namespace LibationWinForms
|
|||||||
// sorting breaks filters. must reapply filters after sorting
|
// sorting breaks filters. must reapply filters after sorting
|
||||||
_dataGridView.Sorted += (_, __) => Filter();
|
_dataGridView.Sorted += (_, __) => Filter();
|
||||||
_dataGridView.CellContentClick += DataGridView_CellContentClick;
|
_dataGridView.CellContentClick += DataGridView_CellContentClick;
|
||||||
|
|
||||||
EnableDoubleBuffering();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EnableDoubleBuffering()
|
|
||||||
{
|
|
||||||
var propertyInfo = _dataGridView.GetType().GetProperty("DoubleBuffered", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
|
|
||||||
|
|
||||||
//var before = (bool)propertyInfo.GetValue(dataGridView);
|
|
||||||
propertyInfo.SetValue(_dataGridView, true, null);
|
|
||||||
//var after = (bool)propertyInfo.GetValue(dataGridView);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Button controls
|
#region Button controls
|
||||||
|
|
||||||
private async void DataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
private async void DataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user