I have a simple application that host the grid control, with about 1000 rows x 20 columns. I am looping through each cell and set its value.
I try do do it in two different ways,
1) m_gird[nRow, nCol].Text = "abc";
2) m_grid[nRow, nCol].CellValue = "abc";
it looks like (2) is faster than (1). However, I only interested in setting the cell''s value. Why is OnStyleChanged needed to be sent out?
I am using Rational Quantify to do some profiling, and I see alot of time is spent in the GridStyleInfo.OnStyleChanged(..) when I am only setting the cell value. Is the function OnStyleChanged need to be executed when I only changing the text?
Anyway, is there a more efficient way to change the cell text for the grid control? I am getting a couple seconds of delay when I initialize the grid in the constructor of my application.