Dim theColor As System.Drawing.Color = New System.Drawing.Color
theColor = System.Drawing.Color.BlanchedAlmound
Dim rowNum As Integer = 0
For rowNum=0 To DataGridView1.RowCount - 1
If DataGridView1.Rows(rowNum).DefaultCellStyle.Backolor = theColor then
Else
DataGridView1.Rows(rowNum).ReadOnly = True
End If
Next
To clear any selection that is clicked, use the property and use .clearselection() to handle the selection event if it is needed.