Quote Originally Posted by dunfiddlin View Post
All the looping is taking the time away, especially the double loops. A lot of these changes can be made with a single command by using the columns as the basic unit rather than the cell, eg.

DataGridView1.Columns(0).DefaultCellStyle.ForeColor = Color.Orange

Then if you want single cells to vary from the column default you can do that for the individual cells rather than looping through setting every one. I have to say I don't really understand the purpose of..

For i = 0 To (rowcnt / 2)
DtdgDataSource.Rows(i).DefaultCellStyle.BackColor = Color.LemonChiffon
Next

Why would you want to divide the DGV in half arbitrarily?
Thanks for reply
yes,that code fasten the execution a lot. We used the code simply for testing. But my problem is we are using same loops for flexgrid also,and its faster than DataGridView for same code. That i need to understand.Is there anything extra to do with DataGridView to speed up?