Search code examples
asp.netajaxcontroltoolkitaccordion

preventing specific ajax accordion pane from expanding until some condition happened


I have an ajax accordion consists of 3 panes and I need to prevent the last 2 panes from expanding except if controls in first pane was filled correctly.

Any suggestions on what event can I use??


Solution

  • Following script prevents users from expanding Pane 3

    <script type="text/javascript">
        function pageLoad()
        {
            RemoveHandlerAtRuntime(2);          
        }
    
    
        function RemoveHandlerAtRuntime(pane)
        {
             $removeHandler($find('AccordionCtrl_AccordionExtender').get_Pane(pane).header,"click",$find('AccordionCtrl_AccordionExtender')._headerClickHandler);
        }
    
    </script>
    

    http://www.dotnetcurry.com/ShowArticle.aspx?ID=215