Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have a ajax accordion control. In header pane I have a checkbox and onchecking that checkbox my accordion should not expand but its is expanding. How to block that?
Posted
Comments
samit kaneriya 28-Jan-14 6:23am    
Post some code if posible
idhris2011 28-Jan-14 7:09am    
Panel headpanel = new Panel();
CheckBox ckSelect = new CheckBox();
ckSelect.ID = "ckselect";
ckSelect.Attributes.Add("onclick", "return dosomething();");
headpanel.Controls.Add(ckSelect);

pn = new AjaxControlToolkit.AccordionPane();
pn.HeaderContainer.Controls.Add(headpanel);
MyAccordion.Panes.Add(pn);
Ahmed Bensaid 28-Jan-14 6:40am    
Can we see your code ?
idhris2011 28-Jan-14 7:09am    
Panel headpanel = new Panel();
CheckBox ckSelect = new CheckBox();
ckSelect.ID = "ckselect";
ckSelect.Attributes.Add("onclick", "return dosomething();");
headpanel.Controls.Add(ckSelect);

pn = new AjaxControlToolkit.AccordionPane();
pn.HeaderContainer.Controls.Add(headpanel);
MyAccordion.Panes.Add(pn);
Ahmed Bensaid 28-Jan-14 9:13am    
Can you post your dosomething() method too ?

1 solution

JavaScript
$('input:checkbox').click(function(e){
    e.stopPropagation();
});


Original thread : Accordion active bar with checkbox[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900