I have a fairly large dataset (1000 rows), that I want to feed into a DataGridView in my Windows Forms application (.NET 3.5). Querying the data from a database, and building up the DataTable is very fast, but when I set the DataSource property of the DataGridView, it literally takes around a minute before the application becomes responsive.
I have tried setting DoubleBuffered to true using the wizardry of reflection, but this seems to have no effect. Any tips?
Just to clarify, the code that has the awful performance is simply this:
dgv1.DataSource = dt;
Where 'dt' is a DataTable I have built up