Mar 07, 2011, 7:24 AM
[CLOSED] Border layout with a toolbar in the centre section, the toolbar floats at the top? How can I stop this...
Hi
Ext.Net RC v1.0
.NET 3.5
Vista Business
I've cut out all the irrelevant bits from our page layout and merged user control code into one file to provide a sample page. Basically we have a border layout in a master page with a top section for a header and a center panel for the page content. One one of the pages the page content is a toolbar (contained in a user control) and a grid (contained in a second user control). When you merge the code of the user controls into one page you get an example (As below). What happens is that the toolbar floats at the top of the screen (over the top of the blue header!) whereas I want it to just appear below the blue header and above the grid and the grid must fill the entire available screen (hence the fit layout).
What's going on here and how can I fix it?
There are server comments around the parts of the layout which are normally contained in user controls to identify them.
Ext.Net RC v1.0
.NET 3.5
Vista Business
I've cut out all the irrelevant bits from our page layout and merged user control code into one file to provide a sample page. Basically we have a border layout in a master page with a top section for a header and a center panel for the page content. One one of the pages the page content is a toolbar (contained in a user control) and a grid (contained in a second user control). When you merge the code of the user controls into one page you get an example (As below). What happens is that the toolbar floats at the top of the screen (over the top of the blue header!) whereas I want it to just appear below the blue header and above the grid and the grid must fill the entire available screen (hence the fit layout).
What's going on here and how can I fix it?
There are server comments around the parts of the layout which are normally contained in user controls to identify them.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ext_forum_post_autoheight_monitorresize.aspx.cs" Inherits="OSyS.Kms._Ext._temp_.ext_forum_post" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Viewport ID="ViewPortMain" runat="server" Layout="border">
<Items>
<ext:Panel ID="headerPanel" runat="server" Border="false" Region="North" Height="76">
<Content>
<ext:Panel runat="server" ID="Header" Border="false">
<Content>
<div style="height: 76px;background-color:blue" id="divHeaderBar" runat="server">
</div>
</Content>
</ext:Panel>
</Content>
</ext:Panel>
<ext:Panel ID="mainPanel" runat="server" Border="false" Region="Center" BodyStyle="background-color : #9493A3;">
<Content>
<%-- TOOBAR USER CONTROL --%>
<ext:Toolbar ID="toolbar1" Cls="kmsToolbar" runat="server">
<Items>
<ext:ToolbarFill ID="ToolbarFill1" runat="server" />
<ext:Button ID="btnAdd" runat="server" Text="Add PHA" Icon="Add" AutoPostBack="true">
<ToolTips>
<ext:ToolTip ID="ToolTip1" runat="server" Title="Add PHA" />
</ToolTips>
</ext:Button>
<ext:Button ID="btnCopy" runat="server" Text="Copy" Icon="PageCopy" AutoPostBack="true">
<ToolTips>
<ext:ToolTip ID="ToolTip2" runat="server" Title="Copy" />
</ToolTips>
</ext:Button>
<ext:ToolbarSeparator />
<ext:Button ID="btnSearch" runat="server" Text="Search & Report" Icon="PageFind" AutoPostBack="true">
<ToolTips>
<ext:ToolTip ID="ToolTip3" runat="server" Title="Search & Report" />
</ToolTips>
</ext:Button>
<ext:ToolbarSeparator />
<ext:Button ID="btnAdvanceSearch" runat="server" Text="Keyword Search" Icon="Magnifier" AutoPostBack="true">
<ToolTips>
<ext:ToolTip ID="ToolTip4" runat="server" Title="Keyword Search" />
</ToolTips>
</ext:Button>
</Items>
</ext:Toolbar>
<%-- END TOOBAR USER CONTROL --%>
<%-- GRID USER CONTROL --%>
<ext:FitLayout ID="FitLayout1" runat="server">
<Items>
<ext:GridPanel ID="gridTaskSummary" Layout="fit" runat="server" StripeRows="true" Title="My Assignments">
<Items>
<ext:Hidden ID="gridData" runat="server" />
<ext:Hidden ID="dateFormat" runat="server" />
<ext:Container ID="Container1" runat="server">
<Content>
</Content>
</ext:Container>
</Items>
<Store>
<ext:Store ID="storeTaskSummary" runat="server" AutoLoad="true">
<Reader>
<ext:ArrayReader>
<Fields>
<ext:RecordField Name="UnitID" Mapping="UnitID" />
<ext:RecordField Name="UnitName" Mapping="UnitName" Type="String" />
<ext:RecordField Name="Title" Mapping="Title" Type="String" />
<ext:RecordField Name="Description" Mapping="Description" Type="String" />
<ext:RecordField Name="ReferenceNumber" Mapping="ReferenceNumber" Type="String" />
<ext:RecordField Name="TargetDate" Mapping="TargetDate" Type="Date" />
<ext:RecordField Name="URL" Mapping="Url" Type="String" />
<ext:RecordField Name="Type" Mapping="Type" />
</Fields>
</ext:ArrayReader>
</Reader>
</ext:Store>
</Store>
<TopBar>
<ext:Toolbar ID="Toolbar2" runat="server">
<Items>
<ext:ToolbarFill ID="ToolbarFill2" runat="server" />
</Items>
</ext:Toolbar>
</TopBar>
</ext:GridPanel>
</Items>
</ext:FitLayout>
<%-- END GRID USER CONTROL --%>
</Content>
</ext:Panel>
</Items>
</ext:Viewport>
</form>
</body>
</html>
Last edited by Daniil; Mar 15, 2011 at 7:12 AM.
Reason: [CLOSED]