Jun 10, 2010, 11:30 AM
[CLOSED] Gridpanel No Scroll Bar (Autoheight?)
I have a gridpanel, set in a borderlayout on a form as below. The scrollbar does not appear on my gridpanel.
I load enough items into the gridpanel (StoreReports) during the Page_Load event to warrant the gridpanel having a vertical scrollbar.
I have tried removing the AutoHeight property from the gridpanel, this then shows the scrollbar, but does not set the height of the gridpanel correctly. I do not want to hard-code the gridpanels height if I can help it (this is a cut down example of a larger page).
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="JDGTest.aspx.vb" Inherits="JDG" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" 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>
<link href="CSS/Custom.css" rel="stylesheet" type="text/css" />
<body>
<form id="form1" runat="server">
<ext:ScriptManager ID="ScriptManagerProxy" runat="server" />
<ext:Store ID="StoreReports" runat="server">
<Reader>
<ext:JsonReader ReaderID="ReportID">
<Fields>
<ext:RecordField Name="ReportID" Type="Int" />
<ext:RecordField Name="ReportName" Type="String" />
<ext:RecordField Name="ReportFileName" Type="String" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
<ext:Panel ID="Panel1" Border="true" runat="server" Height="400" Width="1024">
<Body>
<ext:BorderLayout ID="BorderLayout1" runat="server">
<West>
<ext:Panel ID="Panel12" runat="server" Border="true" Width="270">
<Body>
<ext:GridPanel runat="server" ID="grdReports" Border="false" height="400" StoreID="StoreReports"
AutoExpandColumn="ReportName">
<ColumnModel>
<Columns>
<ext:Column DataIndex="ReportID" Align="Center" ColumnID="ReportID" Header="ReportID"
Hidden="true" />
<ext:Column DataIndex="ReportName" Align="Center" ColumnID="ReportName" Header="Report" />
<ext:Column DataIndex="ReportFileName" ColumnID="ReportFileName" Header="FileName"
Hidden="true" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
</SelectionModel>
</ext:GridPanel>
</Body>
</ext:Panel>
</West>
<Center>
<ext:Panel ID="Panel2" runat="server" Border="true">
<Body>
</Body>
</ext:Panel>
</Center>
</ext:BorderLayout>
</Body>
</ext:Panel>
</form>
</body>
</html>