nested checkBoxLists

Discussion in 'ASP .Net Web Controls' started by DJE2009, Jan 31, 2009.

  1. DJE2009

    DJE2009 Guest

    How does one nest checkboxlists?

    Foreach business, listed in a checkboxlist, I want to display another
    checkboxlist:

    ☑Business 1 ☑Physical ☑ Mailing ☑ Business ☑Records
    ☑Business 2 ☑Physical ☑ Mailing ☑ Business ☑Records
    ☑Business 3 ☑Physical ☑ Mailing ☑ Business ☑Records

    So business names are listed vertically in the first checkboxlist and the
    2nd checkboxlist is displayed horizontally. These are both bound
    checkboxlists.

    I've tried the following on the databound and databinding events:
    CheckBoxList list = new CheckBoxList();
    list.RepeatDirection = RepeatDirection.Horizontal;
    list.DataSource = (DataSet)Cache["AddressTypeId"];
    list.DataTextField = "Description";
    list.DataValueField = "ID";
    list.DataBind();
    tbl1.FindControl("PlaceHolder1").Controls.Add(list);

    This produces nothing on the screen but everything seems good in the debugger.

    Can anyone tell me the right way to do this?
     
    DJE2009, Jan 31, 2009
    #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. =?Utf-8?B?U2FuZHk=?=

    Client side code for two checkboxlists

    =?Utf-8?B?U2FuZHk=?=, Jun 8, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    484
    =?Utf-8?B?U2FuZHk=?=
    Jun 9, 2005
  2. Michael Groeger

    Validation of CheckBoxLists

    Michael Groeger, Sep 29, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    503
    S. Justin Gengo
    Sep 29, 2005
  3. KBuser
    Replies:
    1
    Views:
    847
    Brian
    Apr 11, 2006
  4. Pranav Shah

    DropDownLists, ListBoxs, and CheckBoxLists

    Pranav Shah, Jul 25, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    123
    Ravikanth[MVP]
    Jul 25, 2003
  5. Mike Rogers

    problems with assigning specified indexes to checkboxlists

    Mike Rogers, Aug 9, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    114
    Mike Rogers
    Aug 9, 2003
Loading...

Share This Page