I have to highlight the datagridview rows at runtime if the checkbox of the first column is flagged. I can't use a normal
for each
loop to color the rows because there are about 3000 of them and it would take too long.
I should directly filter the rows from the for each loop with the condition Column1 = True ...
... could you help me find the right synopsis: I tried with:
For Each selRows As DataGridViewRow In myDataGrid.SelectedColumns(0).Equals("Column1 = true")
myDataGrid.Rows(selRows.index).DefaultCellStyle.BackColor = Color.LightGreen
Next
but it does not work
Thank you
You can use the CellPainting event