This is driving me nuts. I have a checkbox in a grid.
I am looping threough to grab their checked state when the button is
clicked.
I continue to get a "False" for the boxes even though I have checked them.
Any thoughts?
Dim i as integer
Dim _item as DataGridItem
For i = 0 to ShowMods.Items.Count-1
_item = ShowMods.items(i)
Dim ApprBox as CheckBox = CTYPE(_item.FindControl("appr"),
Checkbox)
If ApprBox.checked = true then
response.write("yes" & " ")
End If
NEXT
<asp:DataGrid
id="ShowMods"
RUNAT="server"
autoGenerateColumns="false">
<COLUMNS>
<asp:TemplateColumn>
<ItemTemplate>
<asp:checkbox runat="server" id="appr"/>
</ItemTemplate>
</asp:TemplateColumn>
</COLUMNS>