How to response the checkbox's click event in a DataGrid control?

G

Guest

Hi, all
I got a question again. I have a DateGrid in my aspx page which I want
implement a mailbox like yahoo mail.
The first column I defined like this:
<Columns>
<asp:TemplateColumn HeaderText="Select">
<HeaderStyle Width="10px"></HeaderStyle>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<HeaderTemplate>
<asp:CheckBox id="CheckBoxAll" runat="server"></asp:CheckBox>
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox id="CheckBoxMsg" runat="server"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>
......
So the CheckBoxAll on header will make all CheckBoxMsg to checked if we
check it. I don't know how to do this. Becuase there is no event for
CheckBoxAll in DataGrid.Probably I need to play with some script to do this.
Does anyone know how to do this or have a better idea?
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top