I've got a checkbox column in a datagrid view that I'd like to be able
to validate, and if they've checked this column, but something else
needs to be done first, I want to be able to backout and uncheck the
column. How do I do that?


Private Sub dgvDetail_CellContentClick(ByVal sender As
System.Object, ByVal e As
System.Windows.Forms.DataGridViewCellEventArgs) Handles
dgvDetail.CellContentClick
With dgvDetail.CurrentCell
Dim colIndex = .ColumnIndex
If (.OwningColumn.DataPropertyName =
"AccountingAcceptance") Then
If (Convert.ToBoolean(.EditedFormattedValue) = True)
Then
If
(dgvDetail.CurrentRow.Cells("txtNetPaymentAmount").Value.ToString.Length
= 0) Then
If (MsgBox("Do you wish for the Net Payment
Amount to be updated with the value from the Check Amount?",
MsgBoxStyle.YesNo, "Net Payment Amount Needed") = MsgBoxResult.Yes)
Then

dgvDetail.CurrentRow.Cells("txtNetPaymentAmount").Value =
dgvDetail.CurrentRow.Cells("txtCheckAmount").Value
Else
' uncheck it
End If
End If
End If
End If
End With
End Sub