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

Discussion in 'ASP .Net' started by =?Utf-8?B?Tmlja3k=?=, Feb 10, 2005.

  1. 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
     
    =?Utf-8?B?Tmlja3k=?=, Feb 10, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Purvi T
    Replies:
    0
    Views:
    880
    Purvi T
    Oct 19, 2004
  2. Chu
    Replies:
    2
    Views:
    913
    Winista
    Apr 10, 2006
  3. Max2006
    Replies:
    2
    Views:
    1,595
    Walter Wang [MSFT]
    Sep 19, 2007
  4. dave

    stumped...table - row - click event, cancel checkbox event

    dave, Sep 2, 2006, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    231
  5. Charles

    How Do I : Add a Click event to a checkbox in a DataGrid

    Charles, Jul 11, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    142
    Luke Zhang [MSFT]
    Jul 15, 2003
Loading...

Share This Page