Private Sub dgvRecords_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick If e.ColumnIndex = 1 Then Dim IsChecked As Boolean = False IsChecked = CBool(DirectCast(DataGridView1.Rows(DataGridView1.CurrentRow.Index).Cells("No Records"), DataGridViewCheckBoxCell).EditedFormattedValue) If IsChecked Then If MessageBoxButtons.YesNo Then If MsgBox("Did this person attend?", MsgBoxStyle.YesNo, "Attendance") = MsgBoxResult.Yes Then DataGridView1.Rows(DataGridView1.CurrentRow.Index).Cells("Att. (Y/N)").Value = "Y" Else DataGridView1.Rows(DataGridView1.CurrentRow.Index).Cells("Att. (Y/N)").Value = "N" End If Else DataGridView1.Rows(DataGridView1.CurrentRow.Index).Cells.Clear() End If End If End If
MessageBoxButtons.YesNo
IsChecked
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)