Jun 21, 2012, 8:38 PM
I folks, i have a accordion with two sub-panels. When the first one is collapsed and then the second one is expanded the BeforeExpand of the first panel is raised.
To reproduce the problem, please do the following steps:
i think the reason is because the beforeexpand expand was overriden. I did it because i need to collapse all the children of an accordion, as shown in the following thread.
http://forums.ext.net/showthread.php...rdion-children
To reproduce the problem, please do the following steps:
- Collapsed the first panel
- Collapsed the second panel
i think the reason is because the beforeexpand expand was overriden. I did it because i need to collapse all the children of an accordion, as shown in the following thread.
http://forums.ext.net/showthread.php...rdion-children
<script type="text/javascript">
var onAfterRender = function (ct) {
ct.items.each(function (item) {
item.on("beforeexpand", function () {
return !this.layout.processing;
},
ct);
});
};
</script>
<ext:Panel ID="Window1" runat="server" Title="Accordion" Width="250" Height="400"
Maximizable="true" BodyBorder="0" Icon="ApplicationTileVertical" Layout="Accordion">
<LayoutConfig>
<ext:AccordionLayoutConfig Multi="true" />
</LayoutConfig>
<Items>
<ext:Panel ID="Panel1" runat="server" Title="Settings">
<Listeners>
<BeforeExpand Handler="alert('panel 1');" />
</Listeners>
</ext:Panel>
<ext:Panel ID="Panel2" runat="server" Title="Even More Stuff">
<Listeners>
<BeforeExpand Handler="alert('panel 2');" />
</Listeners>
</ext:Panel>
</Items>
<Listeners>
<AfterRender Fn="onAfterRender" />
</Listeners>
</ext:Panel>
Last edited by Daniil; Jun 25, 2012 at 12:18 PM.
Reason: [CLOSED]