2012-07-24 1 views
0

행의 수에 따라 Ext.Net에 상점을 포함하는 패널의 높이를 동적으로 설정하고 싶습니다.Ext.Net에 상점이 들어있는 패널의 높이를 동적으로 설정하십시오.

나는 다음과 같은 코드를있다 : - 내 businessReport2.aspx 페이지는 follwing을 코드

<ext:GridPanel ID="GridPanel1" 
     runat="server" 
     StripeRows="true" 
     AutoHeight="true" 
     AutoWidth="true" 
     TitleCollapse="True"> 
     <Store> 
      <ext:Store ID="Store1" runat="server"> 
       <Reader> 
        <ext:JsonReader> 
         <Fields> 
          <ext:RecordField Name="s_artistname" /> 
          <ext:RecordField Name="s_daysCover" /> 
          <ext:RecordField Name="s_target"/> 
          <ext:RecordField Name="s_sales"/> 
          <ext:RecordField Name="s_variance"/> 
          <ext:RecordField Name="s_cust"/> 
          <ext:RecordField Name="s_unit"/> 
          <ext:RecordField Name="s_avgcustperday"/> 
          <ext:RecordField Name="s_aus"/> 
          <ext:RecordField Name="s_ipt"/> 
          <ext:RecordField Name="s_s_care"/> 
          <ext:RecordField Name="s_scare_percent"/> 
          <ext:RecordField Name="s_face"/> 
          <ext:RecordField Name="s_face_percent"/> 
          <ext:RecordField Name="s_t_hrs"/> 
          <ext:RecordField Name="s_t_prod"/> 
         </Fields> 
        </ext:JsonReader> 
       </Reader> 
      </ext:Store> 
     </Store> 
     <ColumnModel ID="ColumnModel1" runat="server"> 
      <Columns> 
       <ext:RowNumbererColumn /> 
       <ext:Column DataIndex="s_artistname" Header="Operator" Width="120px" Sortable="False" /> 
       <ext:Column DataIndex="s_daysCover" Header="Days" Width="40px" Sortable="False"/> 
       <ext:Column DataIndex="s_target" Header="Target" Width="60px" Sortable="False"> 
        <Renderer Fn="MyMoney" /> 
       </ext:Column> 
       <ext:Column DataIndex="s_sales" Header="Sales" Width="60px" Sortable="False"> 
        <Renderer Fn="MyMoney" /> 
       </ext:Column> 
       <ext:Column DataIndex="s_variance" Header="Variance" Width="60px" Sortable="False"> 
        <Renderer Fn="variance" /> 
       </ext:Column> 
       <ext:Column DataIndex="s_cust" Header="Customers" Width="60px" Sortable="False" /> 
       <ext:Column DataIndex="s_unit" Header="Units" Width="50px" Sortable="False" /> 
       <ext:Column DataIndex="s_aus" Header="AUS" Width="60px" Sortable="False"> 
        <Renderer Fn="AUS" /> 
       </ext:Column> 
       <ext:Column DataIndex="s_ipt" Header="IPT" Width="60px" Sortable="False"> 
        <Renderer Fn="IPT" /> 
       </ext:Column> 
       <ext:Column DataIndex="s_s_care" Header="Skin$" Width="60px" Sortable="False"> 
        <Renderer Fn="MyMoney" /> 
       </ext:Column> 
       <ext:Column DataIndex="s_scare_percent" Header="Skin%" Width="60px" Sortable="False"> 
        <Renderer Fn="skinPercentage" /> 
       </ext:Column> 
       <ext:Column DataIndex="s_face" Header="Face$" Width="60px" Sortable="False" > 
        <Renderer Fn="MyMoney" /> 
       </ext:Column> 
       <ext:Column DataIndex="s_face_percent" Header="Face%" Width="60px" Sortable="False"> 
        <Renderer Fn="facePercentage" /> 
       </ext:Column> 
       <ext:Column DataIndex="s_t_hrs" Header="Hours" Width="60px" Sortable="False"/> 
       <ext:Column DataIndex="s_t_prod" Header="Avg p/h" Width="60px" Sortable="False"> 
        <Renderer Fn="HourlyProd" /> 
       </ext:Column> 
      </Columns> 
     </ColumnModel> 
     <SelectionModel> 
      <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" /> 
     </SelectionModel> 
     <LoadMask ShowMask="true" /> 
    </ext:GridPanel> 

있다 그러나 자동 또는 100 %로 높이를 참가하는

<ext:Panel 
                ID="PanelOp12" 
                runat="server" 
                Layout="FitLayout" 
                AutoHeight="true" 
                Title="Business Report for the previous week" > 
                <AutoLoad Url="BusinessReport2.aspx" Mode="IFrame" ShowMask="true" Cls="abc" /> 

               </ext:Panel> 

. 패널에 스크롤이 필요하지 않습니다. 도와주세요.

감사

답변

4

<ext:Viewport runat="server" Layout="Border"> 
      <Items> 
       <ext:Panel 
        ID="Panel1" 
        runat="server" 
        Layout="FitLayout" 
        Region="Center" 
        Title="Business Report for the previous week" > 
        <AutoLoad Url="CopyExt.NET.Default.aspx" Mode="IFrame" ShowMask="true" /> 

       </ext:Panel> 
      </Items> 
     </ext:Viewport> 
뷰포트를 사용하려고