DataGrid and embeded Checkbox..How to find if checkbox clicked

Discussion in 'ASP .Net' started by =?Utf-8?B?RG90TmV0RGV2?=, Oct 6, 2006.

  1. Hi,

    I have a datagrid.

    <asp:DataGrid id="DataGrid1" runat="server" Height="237px" Width="280px"
    AutoGenerateColumns="False" AlternatingItemStyle-BackColor="#e9e9e9"
    ShowHeader="false" ShowFooter="false" >
    <Columns>
    <asp:TemplateColumn HeaderStyle-Height="0">
    <ItemTemplate>
    <asp:CheckBox id="CheckBox1" AutoPostBack=True
    Text="<%# Container.DataItem %>" runat="server">
    </asp:CheckBox> </ItemTemplate> </asp:TemplateColumn>
    </Columns>
    </asp:DataGrid>
    How can I find out if CheckBox1 is clicked?
     
    =?Utf-8?B?RG90TmV0RGV2?=, Oct 6, 2006
    #1
    1. Advertising

  2. =?Utf-8?B?RG90TmV0RGV2?=

    David Wier Guest

    Check out this code sample at http://aspnet101.com:
    http://aspnet101.com/aspnet101/aspnet/codesample.aspx?code=chkDataGrid

    --
    David Wier
    MVP/ASPInsider
    http://aspnet101.com
    http://aspexpress.com



    "DotNetDev" <> wrote in message
    news:...
    > Hi,
    >
    > I have a datagrid.
    >
    > <asp:DataGrid id="DataGrid1" runat="server" Height="237px" Width="280px"
    > AutoGenerateColumns="False" AlternatingItemStyle-BackColor="#e9e9e9"
    > ShowHeader="false" ShowFooter="false" >
    > <Columns>
    > <asp:TemplateColumn HeaderStyle-Height="0">
    > <ItemTemplate>
    > <asp:CheckBox id="CheckBox1" AutoPostBack=True
    > Text="<%# Container.DataItem %>" runat="server">
    > </asp:CheckBox> </ItemTemplate> </asp:TemplateColumn>
    > </Columns>
    > </asp:DataGrid>
    > How can I find out if CheckBox1 is clicked?
    >
     
    David Wier, Oct 6, 2006
    #2
    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. Duwayne

    Embeded DataGrid

    Duwayne, Feb 26, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    400
    Duwayne
    Feb 26, 2004
  2. Earl Teigrob
    Replies:
    1
    Views:
    343
    Scott Allen
    Jul 9, 2004
  3. Replies:
    1
    Views:
    458
    Cowboy \(Gregory A. Beamer\)
    Aug 16, 2006
  4. AlecL
    Replies:
    3
    Views:
    1,222
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Apr 11, 2007
  5. Joey Pang
    Replies:
    4
    Views:
    527
    Joey Pang
    Jun 13, 2005
Loading...

Share This Page