I posted yesterday as I suspected a LINQ-to-SQL query I had written was painfully slow. What I am doing is getting iterating over the results of my query, and constructing a DataTable from it. I then bind the DataTable to a DataGridView on my form.
I thought the query was the slow part, but I have disproved this - the query, and also the DataTable construction, takes a second or two at most, but when I set the DataSource property on the DataGridView, the app seems to hang for about 10 seconds before it shows the grid.
I've tried setting the DoubleBuffered property on the DGV using reflection, but it sadly made no different. Has anyone else experienced any issues like this?
EDIT: Note, that if the grid has a small amount of rows (i.e. 30-40), it works a treat. As soon as the row count reaches its hundreds, it grinds to a halt