Find Checkbox Control inside gridview in VB
By bryan tugade
We can find checkbox inside gridview by using Findcontrol.
Imports System
Partial Class Default4
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
For i As Integer = 0 To GridView1.Rows.Count - 1
Dim iCheckbox As CheckBox = CType(GridView1.Rows(i).FindControl("Checkbox1"), CheckBox)
iCheckbox.Checked = False
Next
End Sub
End Class
Related FAQs
In C#, we can select and deselect checkbox in gridview in onPostback event of checkbox in gridview header.
We can select and deselect checkbox in gridview in onPostback event of checkbox in gridview header.
Find Checkbox Control inside gridview in VB (930 Views)