PDA

View Full Version : [CLOSED] Grid inside a panel does not show vertical scrollbar



blueworld
Sep 27, 2012, 9:23 AM
Hello,

I have the following basic layout:



<ext:Viewport ID="Viewport1" runat="server" Layout="BorderLayout">
<Items>

<ext:Panel ID="WestPanel" runat="server" Region="West" Collapsible="true" MarginsSummary="5 0 5 5" CMarginsSummary="5 5 5 5" Split="True">
<LayoutConfig>
<ext:HBoxLayoutConfig />
</LayoutConfig>
<Items>


<ext:GridPanel ID="GridPanel1" runat="server"
Icon="Report" StoreID="MyStore" MaxWidth="300" AutoHeight="True" AutoScroll="True" Layout="Fit">
<View>
<ext:GridView runat="server" AutoHeight="True" AutoScroll="true" ID="TourResultGridView">
</ext:GridView>
</View>
<ColumnModel runat="server">
<Columns>
.
.
.
</Columns>
</ColumnModel>
</ext:GridPanel>
</Items>
</ext:Panel>

<ext:Panel runat="server" Region="Center" ID="CenterPanel" Collapsible="false" MarginsSummary="5 5 5 0">
<Content>
<div id="map">
</div>
</Content>
</ext:Panel>
</Items>

</ext:Viewport>


The grid gets filled by a NHibernate query in the code behind with:



MyStore.DataSource = NHibernateQueryResult
MyStore.DataBind()


I have tried several options and layouts, but its always the same, I dont get a vertical scrollbar, you can scroll by clicking and holding the left mouse button inside the grid, and then moving it down, but when this happens there is a big blank south-region displayed in my browser.

Daniil
Sep 27, 2012, 10:47 AM
Hi @blueworld,

Please remove these settings of the GridPanel.

AutoHeight="True" Layout="Fit"

A vertical scrollbar should appear inside the GridPanel, if the combined height of the rows exceeds the GridPanel heights.

blueworld
Sep 27, 2012, 10:55 AM
Hi @blueworld,

Please remove these settings of the GridPanel.

AutoHeight="True" Layout="Fit"

A vertical scrollbar should appear inside the GridPanel, if the combined height of the rows exceeds the GridPanel heights.

Hi Daniil,

still no vertical scrollbar. Are there any wrong GridView properties ?

Daniil
Sep 27, 2012, 12:37 PM
Also please remove

<LayoutConfig> <ext:HBoxLayoutConfig />

</LayoutConfig>


and set

Layout="FitLayout"
and some explicit Width for the WestPanel.

blueworld
Sep 27, 2012, 2:16 PM
Also please remove

<LayoutConfig> <ext:HBoxLayoutConfig />

</LayoutConfig>


and set

Layout="FitLayout"
and some explicit Width for the WestPanel.

Thank you Daniil, works perfectly for me !