Hi all, I've built a method to perform various operations on a DataGridView (disable columns, rename header columns, format cells ecc. ecc.).
The first time I use method with one DataGridView it works very quickly.
If I use the same method another time with the same DataGridView (for example to refresh it after some operations) it works much more slowly.
It takes very long time to perform operations I report below:
dgvCol.DefaultCellStyle.Format = string.Format(veroFormatoNumerico, System.Globalization.CultureInfo.InvariantCulture);
dgvCol.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
dgvCol.HeaderText = sVisualizza;
Why the first time I use them it takes short time and the second time it takes much more time? What should I do?
TIA
Alder