I would like to have an accordion control that I can select from. The best way I can describe this is with a picture- http://lh5.ggpht.com/_4AHxBGhAhe0/TDQEC_1RXtI/AAAAAAAABMk/AE84nPTeyrg/s800/Untitled.gif
(cant post img)
I have this built, but it does not work... It is within a wizard(step). Upon moving on from this step I want to store which checkboxes were selected. The accordion panes are being generated in my code behind (C#), from a datatable. I envisioned using a checkboxlist, but I have not found this possible.
I came across the accordion when searching for a way to display this parent/child data fluidly. It works great for displaying data- I want to do more with it.
Here is my code that generates the accordion panes
foreach (DataRow DR in DTRules.Rows)
{
promoRuleID = Convert.ToInt16(DR["PromoRuleID"]);
refID = Convert.ToInt16(DR["PromoRuleID"]);
headerStr = Convert.ToString(DR["Description"]);
CheckBox liPromoRule = new CheckBox();
liPromoRule.Text = Convert.ToString(DR["Description"]);
contentStr = returnConditions(promoRuleID);
contentStr += returnDiscounts(promoRuleID);
//Create a new Accordion Pane
AccordionPane newAccordion = new AccordionPane();
newAccordion.ID = "pnlRule" + Convert.ToString(DR["PromoRuleID"]);
//Adding the Header control
newAccordion.HeaderContainer.Controls.Add(liPromoRule);
//Adding the Content control
newAccordion.ContentContainer.Controls.Add(new LiteralControl(contentStr));
//Add the pane to the accordion
AccordionRules.Panes.Add(newAccordion);
}
Am I barking up the wrong trees? At least tell me if this is impossible so I can dream up another way to do this. Thanks-