lundi 30 novembre 2015

DataGridView in Check box column counting increment and discriminant in VB.net ? Help me

Look Like This type code but something wrong .. :(

Friend Function Re_chk(ByRef Dgv1 As DataGridView) As Boolean Re_chk = False Try Dim count1 As Integer = 1 For Each row As DataGridViewRow In Dgv1.Rows If row.Cells(7).Value = True Then count1 += 1 End If Next For Each row As DataGridViewRow In Dgv1.Rows If row.Cells(7).Value = False Then count1 -= 1 End If Next Student_Details.LblAttendceCont.Text = count1 Re_chk = True Catch ex As Exception MsgBox(ex.Message) End Try End Function




Aucun commentaire:

Enregistrer un commentaire