la conversion de type "DBNull" en type "Boolean" n'est pas valide
Bonjour,
j'ai un datagridview avec un colonne de chekbox quand je selectionne il me calcule la ligne voici mon code
Code:
1 2 3 4 5 6
| Dim total As Double = 0
For i As Integer = 0 To Me.DataGridView1.Rows.Count - 2
If CBool(Me.DataGridView1.Rows(i).Cells("DET_BL_LIVR").Value) = True Then
total = total + Val(Me.DataGridView1.Rows(i).Cells("DET_BL_MONT").Value)
Me.TXT_TOTALHT.Text = Math.Round(total, 2)
End If |
voici l'erreur:
Citation:
La conversion de type "DBNull" en type "Boolean" n'est pas valide
Merci d'avance