Mar 15, 2013, 2:35 AM
[FIXED] [#176] [2.x] GridPanel not collapsible when title set from code behind.
Hello!
Please investigate the below code. When I set title for "Grid1" from code behind @Page_Load, it is not Collapsible anymore.
Below changes make Grid1 collapsible:
1) Removing title change code from Page_Load()
or
2) Moving Tab2 as the first tab in MyTabPanel items collection.
or
3) Replacing Grid1.SetTitle("Modified-Grid1") with Grid1.Title="Modified-Grid1".
Is there a rational for number 2 and 3?
Thanks.
Please investigate the below code. When I set title for "Grid1" from code behind @Page_Load, it is not Collapsible anymore.
Below changes make Grid1 collapsible:
1) Removing title change code from Page_Load()
or
2) Moving Tab2 as the first tab in MyTabPanel items collection.
or
3) Replacing Grid1.SetTitle("Modified-Grid1") with Grid1.Title="Modified-Grid1".
Is there a rational for number 2 and 3?
Thanks.
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
Grid1.SetTitle("Modified-Grid1");
}
}
</script>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title>Ext.NET Examples</title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server"/>
<div>
<ext:Viewport ID="MyViewport" runat="server" Layout="BorderLayout">
<Items>
<ext:TabPanel runat="server" ID="MyTabPanel" Layout="FitLayout" Region="Center">
<Items>
<ext:Panel runat="server" ID="Tab1" Title="Tab1" Layout="FitLayout"></ext:Panel>
<ext:Panel runat="server" ID="Tab2" Title="Tab2" Layout="FitLayout" MaxHeight="300">
<Items>
<ext:GridPanel runat="server" ID="Grid1" Title="Grid1" Collapsible="true" CollapseDirection="Top"></ext:GridPanel>
</Items>
</ext:Panel>
</Items>
</ext:TabPanel>
</Items>
</ext:Viewport>
</div>
</form>
</body>
</html>
</form>
</body>
</html>
Last edited by fabricio.murta; Apr 26, 2016 at 10:50 PM.