Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Accordion Header remove click event

$
0
0

Hi,

I am trying to use an ajax accordion to perform a step by step information gathering process, allowing a user to only move onto step 2 after clicking button in steps 1.

I also don't want to headers to be clickable and want to drive which panes (selectedindex) should be visible from code behind.

I used the following javascript to disable the headers:

function Disable() {
        var acc;
        var header;
        acc = $get('<%=accApplication.ClientID%>');
        var paneCount = acc.AccordionBehavior._panes.length;
        for (index = 0; index < paneCount; index++) 
        {
            header = acc.AccordionBehavior.get_Pane(index).header;
            $removeHandler(header, "click", acc.AccordionBehavior._headerClickHandler);
        }
    } 

After using this I am unable to change the selected index from code behind like below.

accApplication.SelectedIndex = 1;

Can anyone please assist ?

I appologise if this is the wrong forum and if so please guide me to the correct one.

Thanks


Viewing all articles
Browse latest Browse all 5678

Trending Articles