I'm using the CDN and have an accordion panel that works client-side. This accordion is inside an updatepanel. I have two repeaters, one in each accordion pane. When I've got the second pane open, and a postback occurs, the accordion resets and closes the
second pane and opens the first one. (There's no animation, it just appears like that after the postback). Is there a way to update the panel without having the accordion reset? I tried using:
$(this).set_SelectedIndex(1);
which kept the pane open, but the updatepanel didn't refresh (even though a postback occurred).
Is there a way to have the updatepanel partial-postback the data, refresh and keep the accordion pane open?
Could someone confirm if there is a way to do this, or if it's something that can't be achieved? At the moment, it's nearly at the point where this problem is stopping us from going to production. The UI will have to be rewritten soon if this isn't possible.
Try to place two UpdatePanels inside the Accordion’s two AccordionPanes separately.
Best regards,
Zhi-Qiang Ni
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as
Answer” if a marked post does not actually answer your question.
Thanks, we went ahead an implemented two update panels, but now they only refresh once. If I manually refresh the page, the data is updated, but the updatepanel doesn't update after doing it once. My layout is like this:
I've narrowed it down. At the moment, when the update panel is refreshed, the accordion disappears, because the javascript used doesn't get executed. I added the code below in the EndRequestHandler and that seems to be causing the problem. If I remove it,
then it works fine, but the accordion is loses all formatting and functionality as it's now only a standard div.
ExSL
Member
185 Points
93 Posts
Accordion resets after updatepanel postback
Mar 25, 2010 06:38 PM|LINK
hey ,
I'm using the CDN and have an accordion panel that works client-side. This accordion is inside an updatepanel. I have two repeaters, one in each accordion pane. When I've got the second pane open, and a postback occurs, the accordion resets and closes the second pane and opens the first one. (There's no animation, it just appears like that after the postback). Is there a way to update the panel without having the accordion reset? I tried using:
$(this).set_SelectedIndex(1);
which kept the pane open, but the updatepanel didn't refresh (even though a postback occurred).
Is there a way to have the updatepanel partial-postback the data, refresh and keep the accordion pane open?
Thanks
ExSL
Member
185 Points
93 Posts
Re: Accordion resets after updatepanel postback
Mar 28, 2010 07:14 PM|LINK
hey,
Could someone confirm if there is a way to do this, or if it's something that can't be achieved? At the moment, it's nearly at the point where this problem is stopping us from going to production. The UI will have to be rewritten soon if this isn't possible.
Thanks for any help
Zhi-Qiang Ni...
All-Star
33491 Points
2952 Posts
Microsoft
Re: Accordion resets after updatepanel postback
Mar 30, 2010 09:40 AM|LINK
Hi exsl,
Try to place two UpdatePanels inside the Accordion’s two AccordionPanes separately.
Best regards,
Zhi-Qiang Ni
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as
Answer” if a marked post does not actually answer your question.
ExSL
Member
185 Points
93 Posts
Re: Accordion resets after updatepanel postback
Apr 03, 2010 05:04 PM|LINK
Thanks, we went ahead an implemented two update panels, but now they only refresh once. If I manually refresh the page, the data is updated, but the updatepanel doesn't update after doing it once. My layout is like this:
ExSL
Member
185 Points
93 Posts
Re: Accordion resets after updatepanel postback
Apr 03, 2010 08:32 PM|LINK
I've narrowed it down. At the moment, when the update panel is refreshed, the accordion disappears, because the javascript used doesn't get executed. I added the code below in the EndRequestHandler and that seems to be causing the problem. If I remove it, then it works fine, but the accordion is loses all formatting and functionality as it's now only a standard div.
ExSL
Member
185 Points
93 Posts
Re: Accordion resets after updatepanel postback
Apr 03, 2010 10:26 PM|LINK
Ah solved it (I think). Created a function called pLoad, placed the code above in there and used Sys.Application.add_init() to call the function.