Setting values to cells slow - any suggestions?

Jan 13, 2010 at 2:46 PM


First of all thank you for your great product!

My question is about some slowness shown in the grid while setting values to cells: this is the code.

         List<List<SourceGrid.Cells.Cell>> cells = logic.GetCells();
         grid.Rows.InsertRange(1, cells.Count);
         for (int i = 0; i < cells.Count; i++)
                for (int j = 0; j < cells[i].Count; j++)
                    grid[i+1, j] = cells[i][j];

The interesting thing is that the time of a single set grows with the number of the already-set cells. So in the beginning this code is very fast but it slows down as the rows grows (to 1000+).

I've tried to Suspend/Resume layout with no result.

Jan 14, 2010 at 2:24 PM

I'm sorry I was using the old version (4.21)!

Using the new version it's all ok. I was convinced I was using the latest version..