1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Private Sub DataGridView1_CurrentCellDirtyStateChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DataGridView1.CurrentCellDirtyStateChanged
CheckBox_Etat_Change()
End Sub
Sub CheckBox_Etat_Change()
Dim maCheck As new DataGridViewCheckBoxCell
Dim maLigne As new DataGridViewRow
Dim index As Integer = 0
Dim boolCell As Boolean
boolCell = maCheck.InheritedState
index = maCell.RowIndex
If boolCell = True Then
My_Frm_confAPI.DataGridView1.Rows.Item(index).DefaultCellStyle.BackColor = Color.Aqua
Else
My_Frm_confAPI.DataGridView1.Rows.Item(index).DefaultCellStyle.BackColor = Color.White
End If
End Sub |
Partager