May 26, 2011, 9:26 AM
[CLOSED] GridPanel horizontal scrollbar
Hi, on my page I have 2 gridpanels (GridPanelReservation and GridPanelQuotation) (according with a checkbox value one is hidden and the other is shown and viceversa). The gridpanel that is shown at the beginning, displays the horizontal scrollbar correctly. However, when the another gridpanel is shown (and the first gridpanel's hidden), no scrollbar displays. I adjust you my code:
(A simplified version of my) Aspx code:
Thank you in advance
(A simplified version of my) Aspx code:
<ext:Viewport ID="Viewport1" runat="server">
<content>
<ext:BorderLayout ID="BorderLayout1" runat="server">
<North MarginsSummary="0 0 0 0">
<ext:Panel ID="PanelNorth" runat="server" AutoScroll="true" Frame="true" Border="false"
AutoHeight="true">
<Content>
<ext:Panel ID="FilterPanel" runat="server" AutoScroll="true" Frame="true" Border="false"
AutoHeight="true" Collapsible="true" Title="<%$ Resources: FilterPanel.Title %>"
TitleCollapse="true">
<Content>
<ext:Radio ID="rbIsReservation" runat="server" BoxLabel="<%$ Resources: rbReservation %>" Name="rgOperationType" Checked="true" >
<DirectEvents>
<Check OnEvent="rgOperationType_Change" />
</DirectEvents>
</ext:Radio>
</td>
<td>
<ext:Radio ID="rbIsQuotation" runat="server" BoxLabel="<%$ Resources: rbQuotation %>" Name="rgOperationType" >
<DirectEvents>
<Check OnEvent="rgOperationType_Change" />
</DirectEvents>
</ext:Radio>
</Content>
<Listeners>
<Expand Handler="#{Viewport1}.syncSize();#{FilterPanel}.doLayout();" />
<Collapse Handler="#{Viewport1}.syncSize();#{FilterPanel}.doLayout();" />
</Listeners>
</ext:Panel>
</Content>
</ext:Panel>
</North>
<Center MarginsSummary="0 0 0 0">
<ext:Panel ID="panelData" runat="server" Title="" Layout="fit">
<Items>
<ext:GridPanel ID="GridPanelReservation" StripeRows="true" runat="server" Title="<%$ Resources: GridPanel.Title %>"
StoreID="storeReservationResult" Border="false" TrackMouseOver="true" Header="false">
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column ColumnID="UniqueId" Align="Center" Width="90" DataIndex="UniqueId" />
[more columns...]
</Columns>
</ColumnModel>
</ext:GridPanel>
<ext:GridPanel ID="GridPanelQuotation" StripeRows="true" runat="server" Title="<%$ Resources: GridPanel.Title %>"
StoreID="storeQuotationResult" Border="false" TrackMouseOver="true" Header="false"
AutoHeight="true">
<ColumnModel ID="ColumnModel3" runat="server">
<Columns>
<ext:Column ColumnID="UniqueId" Align="Center" Width="90" DataIndex="UniqueId" />
[more columns...]
</Columns>
</ColumnModel>
</ext:GridPanel>
</Items>
</ext:Panel>
</Center>
</ext:BorderLayout>
</content>
</ext:Viewport>
On the code-behind: protected void rgOperationType_Change(object sender, EventArgs e)
{
if (rbIsReservation.Checked)
{
GridPanelReservation.Show();
GridPanelQuotation.Hide();
}
else
{
GridPanelReservation.Hide();
GridPanelQuotation.Show();
}
Viewport1.SyncSize();
FilterPanel.DoLayout();
}
Note.- On my code, there is also logic for the panel FilterPanel on the panel north, to addapt this panel to a simplified view or an expert view, but it works fine. I have tested removing the attribute Layout="Fit" on the panelData with no success.Thank you in advance
Last edited by Daniil; May 27, 2011 at 9:17 AM.
Reason: [CLOSED]