Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > nested checkBoxLists

Reply
Thread Tools

nested checkBoxLists

 
 
DJE2009
Guest
Posts: n/a
 
      01-31-2009
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?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamically generate checkboxlists (ASP .net 2.0 w/ C#) KBuser ASP .Net 1 04-11-2006 12:35 PM
Validation of CheckBoxLists Michael Groeger ASP .Net 3 09-29-2005 03:53 PM
Client side code for two checkboxlists =?Utf-8?B?U2FuZHk=?= ASP .Net 2 06-09-2005 01:11 AM
problems with assigning specified indexes to checkboxlists Mike Rogers ASP .Net Web Controls 0 08-09-2003 10:46 AM
DropDownLists, ListBoxs, and CheckBoxLists Pranav Shah ASP .Net Web Controls 1 07-25-2003 08:51 AM



Advertisments