Click to See Complete Forum and Search --> : DataGrid - TemplateColumn - Checkbox help needed


David Flores
September 25th, 2002, 02:50 PM
hello all,
I have a datagrid with a bunch of columns, the last column is a template column of checkboxes and the footer of the column is a button. below is the code for the column.

<asp:TemplateColumn HeaderText="Request">
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<FooterStyle HorizontalAlign=Center></FooterStyle>
<FooterTemplate>
<asp:Button Text="Request" Runat=server ID=ButtonRequest></asp:Button>
</FooterTemplate>
<ItemStyle HorizontalAlign="Center" Width="5%"></ItemStyle> <ItemTemplate>
<asp:CheckBox id="CheckRequest" Runat="server" />
</ItemTemplate>
</asp:TemplateColumn>


When the user clicks the button, I wanna know which checkboxes are checked. Thanks in advance.

David

David Flores
September 25th, 2002, 02:58 PM
i guess asp.net code doesnt come through or some how it gets filter.

hhieu
January 21st, 2003, 06:50 PM
Hi,
You should use a loop to check

For i = 1 to Datagrid.Row.count
if (Checkbox.value) is Null then
End if
Next

Hope this help