CheckBox in DataGrid .

Discussion in 'ASP .Net Datagrid Control' started by Kylin, Apr 22, 2005.

  1. Kylin

    Kylin Guest

    How can I judge which checkbox is checked ?



    for(int i=0;i<dgOrderList.Items.Count;i++)
    {
    CheckBox
    ordercheck=(CheckBox)dgOrderList.Items.FindControl("OrderCheck");
    if (ordercheck.Checked==true)
    {
    Response.Write(i.ToString());
    }

    }

    and no results that I want to have ,
    any help ?
    Kylin, Apr 22, 2005
    #1
    1. Advertising

  2. Kylin

    dinil Guest

    check whether the checkbox is a server control.

    "Kylin" <> wrote in message
    news:...
    > How can I judge which checkbox is checked ?
    >
    >
    >
    > for(int i=0;i<dgOrderList.Items.Count;i++)
    > {
    > CheckBox
    > ordercheck=(CheckBox)dgOrderList.Items.FindControl("OrderCheck");
    > if (ordercheck.Checked==true)
    > {
    > Response.Write(i.ToString());
    > }
    >
    > }
    >
    > and no results that I want to have ,
    > any help ?
    >
    >
    >
    dinil, Apr 22, 2005
    #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. tshad
    Replies:
    0
    Views:
    509
    tshad
    Apr 15, 2005
  2. Vikram

    disable checkbox list checkbox

    Vikram, Jan 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,383
    ThunderMusic
    Jan 25, 2006
  3. =?Utf-8?B?RG90TmV0RGV2?=

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

    =?Utf-8?B?RG90TmV0RGV2?=, Oct 6, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    807
    David Wier
    Oct 6, 2006
  4. Jason Huang
    Replies:
    0
    Views:
    539
    Jason Huang
    Jun 29, 2007
  5. Joey Pang
    Replies:
    4
    Views:
    508
    Joey Pang
    Jun 13, 2005
Loading...

Share This Page