PDA

View Full Version : [CLOSED] Close East Panel by Server side code



kevinhwang
Jul 11, 2013, 7:30 PM
Hi Support Team,

I use panel using east and center panel for my project.
I want to know how I can close east panel by server side code.

Currently the page looks like this.
6531

I want to do it like below on server side code.
6532

Baidaly
Jul 12, 2013, 12:37 AM
Hello!

You should use Collapse method of the Panel:



<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<script runat="server">
public void CollapseWest(object sender, DirectEventArgs e)
{
Navigation.Collapse();
}
</script>

<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET Examples</title>
</head>
<body>
<ext:ResourceManager runat="server" />


<ext:Button
ID="Button1"
runat="server"
Text="Collapse"
Icon="Application">
<DirectEvents>
<Click OnEvent="CollapseWest"></Click>
</DirectEvents>
</ext:Button>

<ext:Window
ID="Window1"
runat="server"
Title="Simple Layout"
Icon="Application"
Width="600"
Height="350"
Border="false"
Collapsible="true"
Plain="true"
Layout="BorderLayout">
<Items>
<ext:Panel
runat="server"
Region="West"
Collapsible="true"
MinWidth="175"
Split="true"
Width="175"
Title="Navigation"
ID="Navigation" />
<ext:TabPanel
runat="server"
Region="Center"
ActiveTabIndex="0">
<Items>
<ext:Panel
ID="Tab1"
runat="server"
Title="First Tab"
BodyPadding="6"
Html="First Tab"
/>
<ext:Panel
ID="Tab2"
runat="server"
Title="Another Tab"
BodyPadding="6"
Html="Another Tab"
/>
<ext:Panel
ID="Tab3"
runat="server"
Title="Closeable Tab"
Closable="true"
BodyPadding="6"
Html="Closable Tab"
/>
</Items>
</ext:TabPanel>
</Items>
</ext:Window>
</body>
</html>