Oct 10, 2014, 9:27 PM
[CLOSED] AccordionLayout and hiding items
What is the correct way to hide/show panels in an AccordionLayout and still have the expand/collapse work properly. The code below can demonstrate the issue.
a) Execute the code and you will see four panels. Press the "Hide 4th Panel" button and the last panel will be hidden. If you expand the 3rd panel and then collapse it you would expect the 2nd panel to expand, but in this case no panels are expanded because it is expecting the 4th panel to be shown.
b) Even a little more strange. Execute the code and you will see four panels. Expand 4th Panel, Press "Hide 4th Panel" button, Expand 1st Panel, Press "Show 4th Panel" button, Expand 2nd Panel. The 2nd panel expands, but the 1st panel is still shown.
Any thoughts?
a) Execute the code and you will see four panels. Press the "Hide 4th Panel" button and the last panel will be hidden. If you expand the 3rd panel and then collapse it you would expect the 2nd panel to expand, but in this case no panels are expanded because it is expecting the 4th panel to be shown.
b) Even a little more strange. Execute the code and you will see four panels. Expand 4th Panel, Press "Hide 4th Panel" button, Expand 1st Panel, Press "Show 4th Panel" button, Expand 2nd Panel. The 2nd panel expands, but the 1st panel is still shown.
Any thoughts?
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>AccordionLayout - Issue</title>
<link href="/resources/css/examples.css" rel="stylesheet" />
</head>
<body>
<ext:ResourceManager runat="server" />
<h1>Accordion Layout in Markup</h1>
<ext:Window
runat="server"
Title="Accordion"
Width="250"
Height="400"
Maximizable="true"
BodyBorder="0"
Icon="ApplicationTileVertical"
Layout="Accordion">
<TopBar>
<ext:Toolbar runat="server">
<Items>
<ext:Button ID="HideStuff" runat="server" Text="Hide 4th Panel" Icon="BulletDelete"
OnClientClick="App.Panel4.hide();" />
<ext:Button ID="ShowMyStuff" runat="server" Text="Show 4th Panel" Icon="BulletAdd"
OnClientClick="App.Panel4.show();" />
</Items>
</ext:Toolbar>
</TopBar>
<Items>
<ext:TreePanel runat="server" Title="1st Panel" RootVisible="false">
<Root>
<ext:Node Text="Root">
<Children>
<ext:Node Text="Friends" Expanded="true">
<Children>
<ext:Node Text="George" Icon="User" Leaf="True" />
<ext:Node Text="Brian" Icon="User" Leaf="True" />
</Children>
</ext:Node>
<ext:Node Text="Family" Expanded="true">
<Children>
<ext:Node Text="Kelly" Icon="UserFemale" Leaf="True" />
</Children>
</ext:Node>
</Children>
</ext:Node>
</Root>
</ext:TreePanel>
<ext:Panel ID="Panel2" runat="server" Title="2nd Panel" Html="2nd Panel" />
<ext:Panel ID="Panel3" runat="server" Title="3rd Panel" Html="3rd Panel" />
<ext:Panel ID="Panel4" runat="server" ClientIDMode="Static" Title="4th Panel" Html="4th Panel" />
</Items>
</ext:Window>
</body>
</html>
Last edited by Daniil; Oct 13, 2014 at 3:09 PM.
Reason: [CLOSED]