From d770109d8609436d4ee6ea0578a0a58cae3ac3e7 Mon Sep 17 00:00:00 2001 From: Michael Bucari-Tovo Date: Tue, 10 Aug 2021 00:15:07 -0600 Subject: [PATCH] Removed double buffering. --- LibationWinForms/ProductsGrid.cs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/LibationWinForms/ProductsGrid.cs b/LibationWinForms/ProductsGrid.cs index 482f2218..5879ac9c 100644 --- a/LibationWinForms/ProductsGrid.cs +++ b/LibationWinForms/ProductsGrid.cs @@ -38,19 +38,8 @@ namespace LibationWinForms // sorting breaks filters. must reapply filters after sorting _dataGridView.Sorted += (_, __) => Filter(); _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 private async void DataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)