Answer the question
In order to leave comments, you need to log in
Is it possible to increase the speed of hiding columns in a DataGridView?
There is a massive DataGridView (about 150 columns),
you need to hide 60 columns out of these 150, as a result, we get a drawdown in the formation for 8 seconds, because hiding (Visible = false) is set at 130-150ms for each column, is it somehow treated? Didn't google anything that works
Answer the question
In order to leave comments, you need to log in
myControl.SuspendLayout();
... меняем контент в myControl ...
myControl.ResumeLayout(false);
myControl.PerformLayout();
public partial class MainWindow : Form
{
/// <summary>
/// Fix for slow UI rendering
/// </summary>
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000; // Turn on WS_EX_COMPOSITED
return cp;
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question