how to reach checkbox in gridview c#-vb.net / Gridview içerisinde checkbox’a erişme c#-vb.net

C#

foreach (GridViewRow row in tblList.Rows) {
	CheckBox chk = (CheckBox)row.FindControl("chkCase");
	if (chk != null) 
        {
		if (chk.Checked) 
                {
			isOk = true;
		}
	}
}

VB

 For Each row As GridViewRow In tblList.Rows
            Dim chk As CheckBox = CType(row.FindControl("chkCase"), CheckBox)
            If chk IsNot Nothing Then
                If chk.Checked Then
                    isOk = True
                End If
            End If
        Next

Leave a Reply

Your email address will not be published. Required fields are marked *