lorena
Centurion
I have a form with a datagrid that loads open and closed records for the users to view. They need to be able to edit records that are not closed but closed records should be read only. Is there a way to do this? I thought I had a handle on it but my coe doesn't work.
Here it is:
Sub dgRecs_EditRow(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)
dgRecs.EditItemIndex = e.Item.ItemIndex
If IsDate(e.Item.Cells(8).Text) Then
e.Item.Cells(8).Enabled = False
End If
BindData()
End Sub
Here it is:
Sub dgRecs_EditRow(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)
dgRecs.EditItemIndex = e.Item.ItemIndex
If IsDate(e.Item.Cells(8).Text) Then
e.Item.Cells(8).Enabled = False
End If
BindData()
End Sub