Private Sub CountRow(ByVal sender As Object, ByVal e As EventArgs) Handles GridView1.Load, btnFind.Click
Dim i As Integer = 0
Dim i2 As Integer = 0
For Each row As GridViewRow In GridView1.Rows
Dim cb As CheckBox = row.Cells(8).FindControl("cb1") 'เข้าแถว
If cb.Checked Then
i += 1
txtCountRow.Text = i
End If
Next
End Sub
Private Sub CountNotRow(ByVal sender As Object, ByVal e As EventArgs) Handles GridView1.Load, btnFind.Click
Dim i As Integer = 0
For Each row As GridViewRow In GridView1.Rows
Dim cb As CheckBox = row.Cells(8).FindControl("cb1") 'ไม่เข้าแถว
If Not cb.Checked Then
i += 1
txtCountNotRow.Text = i
End If
Next
End Sub