2012-12-17 2 views
0

안드로이드 네이티브 브라우저에서 gridview를 수평으로 스크롤하려고합니다. 내 gridview를 panel 태그에 넣었습니다. 그러나 안드로이드 모바일에서는 수평 스크롤이 작동하지 않습니다. 그것은 아이폰에서 잘 작동합니다. 어떤 제안. 코드는 다음과 같습니다. 같은 CSS 사업부와패널 스크롤 asp.net android

  <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
       AllowSorting="True" AutoGenerateColumns="False" BackColor="White" 
       BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
       DataSourceID="test" GridLines="Vertical" 
       ShowFooter="True" onrowdatabound="GridView1_RowDataBound" PageSize="20" Width = "100%" style =" display:table; width:100%; 
     word-wrap: break-word; " scrollbars="horizontal"> 
       <AlternatingRowStyle BackColor="#DCDCDC" /> 
       <Columns> 
        <asp:BoundField DataField="location_name" HeaderText="Location Name" ><ItemStyle /></asp:BoundField> 
        <asp:BoundField DataField="room_type_description" HeaderText="Room Type" ><ItemStyle /></asp:BoundField> 
        <asp:BoundField DataField="arrival_date" HeaderText="Arrival Date" 
         DataFormatString="{0:d}" ><ItemStyle /></asp:BoundField> 
        <asp:BoundField DataField="departure_date" HeaderText="Departure Date" 
         DataFormatString="{0:d}" ><ItemStyle /></asp:BoundField> 
        <asp:BoundField DataField="nights" HeaderText="# of Nights Stayed" ><ItemStyle HorizontalAlign="Right" /></asp:BoundField> 
        <asp:BoundField DataField="reservation_number" HeaderText="Reservation Number" ><ItemStyle /></asp:BoundField> 
        <asp:TemplateField HeaderText="Points"> 
         <EditItemTemplate> 
          <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("points") %>'></asp:TextBox> 
         </EditItemTemplate> 
         <ItemTemplate> 
          <asp:Label ID="Label1" runat="server" Text='<%# Bind("points") %>'></asp:Label> 
         </ItemTemplate> 
         <ItemStyle HorizontalAlign="Right" /> 
         <FooterTemplate> 
          <asp:Label ID="subTotalValueLabel" runat="server" Text=""></asp:Label><br /> 
          <asp:Label ID="grandTotalValueLabel" runat="server" Text=""></asp:Label> 
         </FooterTemplate> 
        </asp:TemplateField> 
       </Columns> 
       <FooterStyle BackColor="#CCCCCC" ForeColor="Black" Font-Bold="True" 
        HorizontalAlign="Right"/> 
       <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" /> 
       <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /> 
       <RowStyle BackColor="#EEEEEE" ForeColor="Black" /> 
       <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /> 
       <SortedAscendingCellStyle BackColor="#F1F1F1" /> 
       <SortedAscendingHeaderStyle BackColor="#0000A9" /> 
       <SortedDescendingCellStyle BackColor="#CAC9C9" /> 
       <SortedDescendingHeaderStyle BackColor="#000065" /> 

       <EmptyDataTemplate> 
        <table cellspacing="0" cellpadding="3" rules="cols" border="1" style="background-color:White;border-color:#999999;border-width:1px;border-style:None;border-collapse:collapse;"> 
         <tr style="color:White;background-color:#000084;font-weight:bold;"> 
          <th scope="col">Location Name</th><th scope="col">Room Type</th><th scope="col">Arrival Date</th><th scope="col">Departure Date</th><th scope="col"># of Nights Stayed</th><th scope="col">Reservation Number</th><th scope="col">Points</th> 
         </tr><tr style="color:Black;background-color:#EEEEEE;"> 
          <td colspan="7" align="center">No stay history data found.</td> 

        </table>       
       </EmptyDataTemplate> 

       <SortedAscendingCellStyle BackColor="#F1F1F1" /> 
       <SortedAscendingHeaderStyle BackColor="#0000A9" /> 
       <SortedDescendingCellStyle BackColor="#CAC9C9" /> 
       <SortedDescendingHeaderStyle BackColor="#000065" /> 

      </asp:GridView> 
      <asp:Label ID="TotalPointsAvailableLabel" runat="server" Text=""></asp:Label> 
     </asp:Panel> 

답변

0

보십시오 : .grdScroll { moverflow : 이동; } 그리고 나서 .aspx : gridview 컨트롤