Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   nested checkBoxLists (http://www.velocityreviews.com/forums/t780923-nested-checkboxlists.html)

DJE2009 01-31-2009 01:22 AM

nested checkBoxLists
 
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?



All times are GMT. The time now is 02:40 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.