|
-
May 20th, 2013, 11:35 PM
#11
Thread Starter
Addicted Member
Re: Formatting is slow in DataGridView than MSFlexgrid
 Originally Posted by dunfiddlin
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?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|