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

    ☑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

    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";

    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. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.