How to know how many checkboxes are checked in gridview

You need to iterate through the rows to find each check box.

VB.NET:
Expand Collapse Copy
Dim count As Integer = 0
        For Each row As DataGridItem In grvData.Rows
            Dim chkBox As CheckBox = row.FindControl("CHECKBOX")
            If chkBox.Checked Then
                count += 1
            End If
        Next

Something like that should do it.
 
Back
Top