' VB.NET Code
Dim tr As TableRow
Dim RowCounter As Integer = 0
For Each tr In GridViewID.Rows
Dim cb As CheckBox = GridViewID.Rows(RowCounter).Cells(0).FindControl("CheckBoxID")
If cb IsNot Nothing And cb.Checked = True Then
'Code to pull data from GridViewID and compare to DB
'Code to Update MySQL Database
RowCounter = +1
End If
next
<!--ASP / HTML CODE-->
<asp:GridView ID="GridViewID" runat="server">
<Columns>
<asp:TemplateField HeaderText="CheckBox Column">
<ItemTemplate>
<asp:CheckBox runat="server" ID="CheckBoxID" Checked="false" EnableViewState="true" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE