I have an Accordion control with 10 panes and it uses CSS classes to determine what the headers look like:
<cc1:Accordion ID="Accordion1" runat="server"
HeaderCssClass="accordionHeader" HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent"
SelectedIndex="0" FadeTransitions="True" FramesPerSecond="40" TransitionDuration="250" AutoSize=None Visible=false>
<Panes>
<cc1:AccordionPane ID="AccordionPane0" runat="server">
<Header>
<uc2:RecHeader id="RecHeader0" runat="server"></uc2:RecHeader>
</Header>
<Content>
<uc1:RecDetail ID="RecDetail0" runat="server" />
</Content>
</cc1:AccordionPane>
/* Accordion */
.accordionHeader
{
border: 1px solid #2F4F4F;
color: white;
background-color: #2E4d7B;
font-family: Arial, Sans-Serif;
font-size: 20px;
font-weight: bold;
padding: 5px;
margin-top: 5px;
cursor: pointer;
}
.accordionHeaderSelected
{
border: 1px solid #2F4F4F;
color: white;
background-color: #5078B3;
font-family: Arial, Sans-Serif;
font-size: 20px;
font-weight: bold;
padding: 5px;
margin-top: 5px;
cursor: pointer;
}This works - as I select an Accordion control header, the selected pane switches to the "accordionHeaderSelected" style (and the other panes all switch to "accordionHeader"). However, I have a wierd situation where I end up with more than one pane using the "Selected" style (even though only one pane can be selected at a time). This is because of some editing I am doing using a user control within the panes of the Accordion.
Is there a way to programatically (VB, preferably) "force" panes to use a specific CSS style? I know which of the panes is currently selected and I want the remaining 9 to use the usual "accordionHeader" style.
I would appreciate any suggestions/comments.
Thank you!