we are trying to make certain rows readonly on a datagridview
We have a datagridview control which is bound
on the form load event after the datagrid has been set
we run the following
Dim cnt As Integer
For cnt = 0 To Me.dgvCorr.Rows.Count - 1
If CInt(Me.dgvCorr.Rows(cnt).Cells("disable").Value) = 1 Then
dgvCorr.Rows(cnt).ReadOnly = True
End If
Next
It is going to this code.
Yet the readonly property is not sticking.
I tried putting this code in different places such as form paint
datagridview after binding etc.
Just never works - what should really do.
Thanks,