iterate through checkboxes issue
Hope you can help.
I have a project with: a datagrid, and the datagrid has some columns with values received from: a SQL database. the last column of the datagrid, is made of checkboxes.
ok so I have added some rows in SQL and they appeared in the datagrid as they should, together with the corresponding checkbox in the last column. my question is however how can I recognise the checkbox's status?
so theres checkboxes added dynamically (for each row inserted from SQL) so I cant target each of them by ID, i need some sort of iteration, like:
foreach(Checkbox in whatever...)
{
do..stuff
}
however the foreach does not work at all. the "whatever" should be the ID of the checkbox? it does not see my control in intellisense or how its called, which means it does not recognise the ID of the checkbox. so I dont know how to target them.
They were created from the aspx file like this:
<asp:datagrid ... >
<columns>
...
</columns>
<templatecolumn>
<itemtemplate>
<asp:Checkbox ID="blabla" runat="server" />
</itemtemplate>
</templatecolumn>
</asp:datagrid>
so when a new column is made from SQL it receives a checkbox too.
how do i target them?
Thank you in advance.

