[2005] - Colouring Rows In DataGridView
Hi All,
Looking at the code from this Thread, when looping through the values, the http request can sometimes cause a "operation time out" when the connection is down / running really really slow. How would I mark the rows where the data failed to scrape?
Re: [2005] - Colouring Rows In DataGridView
Set the DefaultCellStyle.BackColor property of the row.
Re: [2005] - Colouring Rows In DataGridView
Hey jm,
I tried the following combinations but it is not working as expected...
Code:
DataGridView2.Rows(I).DefaultCellStyle.BackColor = Color.Crimson
- The row will flash red then return to transparent
Code:
DataGridView2.CurrentRow.DefaultCellStyle.BackColor = Color.Crimson
- Returns and error message... Object not referenced to instance
Re: [2005] - Colouring Rows In DataGridView
The error message on the second code snippet would indicate that there is no current row, hence the CurrentRow property is Nothing.
As for the first one, you must be changing the BackColor elsewhere as if you see the row flash red then that specific code is obviously working.