DataList checkbox status

Discussion in 'ASP .Net' started by Vannela, Dec 16, 2003.

  1. Vannela

    Vannela Guest

    I want to get the status of the checkbox control in the
    item template of the DataList in the code behind

    Using findcontrol i am not able to get the status of the
    checkbox . How shouls i get the status of the checkbox
    whether it is checked or not?\

    Thank you
    Vannela, Dec 16, 2003
    #1
    1. Advertising

  2. Hi Vannela,
    This piece of code should do (the key is to iterate the Items collection!).

    foreach ( DataListItem item in ItemsList.Items )
    {
    CheckBox chk = (CheckBox) item.FindControl("CheckBox1");
    bool checkedValue = chk.Checked;
    }

    Regards
    Claudio

    "Vannela" <> wrote in message
    news:08fa01c3c395$8f3cdd60$...
    > I want to get the status of the checkbox control in the
    > item template of the DataList in the code behind
    >
    > Using findcontrol i am not able to get the status of the
    > checkbox . How shouls i get the status of the checkbox
    > whether it is checked or not?\
    >
    > Thank you
    Claudio Perrone, Dec 17, 2003
    #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. Nevyn Twyll
    Replies:
    8
    Views:
    1,869
  2. VB Programmer
    Replies:
    1
    Views:
    4,420
    Ken Cox [Microsoft MVP]
    Apr 13, 2005
  3. saha
    Replies:
    0
    Views:
    4,062
  4. Replies:
    1
    Views:
    451
  5. Vannela

    Hoe to get DataList Checkbox status in item template

    Vannela, Dec 16, 2003, in forum: ASP .Net Building Controls
    Replies:
    4
    Views:
    234
    Vannela
    Dec 29, 2003
Loading...

Share This Page