Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# GridView的水平滚动条、Div内部、面板内部、Div内部_C#_Asp.net_Gridview_Scrollbar - Fatal编程技术网

C# GridView的水平滚动条、Div内部、面板内部、Div内部

C# GridView的水平滚动条、Div内部、面板内部、Div内部,c#,asp.net,gridview,scrollbar,C#,Asp.net,Gridview,Scrollbar,非常复杂,但我在GridView上方的Div中尝试了旧的overflow-x:auto,但它不起作用。有没有其他解决办法?我将尝试将代码保留在相关内容中,因此我的ASP如下所示: <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <div id="MainDiv" style="height:500px; margin-left:20px;">

非常复杂,但我在GridView上方的Div中尝试了旧的
overflow-x:auto
,但它不起作用。有没有其他解决办法?我将尝试将代码保留在相关内容中,因此我的ASP如下所示:

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
   <div id="MainDiv" style="height:500px; margin-left:20px;">

      <asp:Panel runat="server" ID="ShowDiv1" Visible="false" BorderStyle="Solid" BorderWidth="0" Width="440px" Height="530px" style="margin-left:20px;">
         <asp:DropDownList ID="ddlStatusCode" runat="server" OnSelectedIndexChanged="ddlStatusCode_OnSelectedIndexChanged" AutoPostBack="true">
            <asp:ListItem Value="1"> Open </asp:ListItem>
            <asp:ListItem Value="2"> Pended for Source Documents </asp:ListItem>
            <asp:ListItem Value="3"> Send to CSE </asp:ListItem>
            <asp:ListItem Value="4"> Send to Auditor </asp:ListItem>
            <asp:ListItem Value="5"> Assigned </asp:ListItem>
            <asp:ListItem Value="6"> Question to TC </asp:ListItem>
        </asp:DropDownList>

        <!-- Leads: 1 -->
        <div id="divGrid_Open" runat="server" style='width:1350px; height:320px; overflow-x:auto'>
            <asp:GridView ID="DataGrid_Open" runat="server" 
                AllowSorting="True" AutoGenerateColumns="False" ShowFooter ="false" CellPadding="0" 
                CssClass="hoverTable"
                HeaderStyle-BackColor="#5D7B9D" HeaderStyle-BorderColor="#4DA6A6" HeaderStyle-ForeColor="White"
                HeaderStyle-Font-Size="x-Small" itemstyle-font-size="x-small" EditItemStyle-font-size="x-small"
                FooterStyle-BackColor="#5D7B9D" FooterStyle-BorderColor="#4DA6A6" FooterStyle-ForeColor="White"

                DataKeyNames="Audit_Number"
                OnRowCancelingEdit="DataGrid_Open_CancelCommand"
                OnRowDataBound="DataGrid_Open_RowDataBound" 
                OnDataBound="DataGrid_Open_OnDataBound"
                OnRowEditing="DataGrid_Open_EditCommand" 
                OnRowUpdating="DataGrid_Open_UpdateCommand">  
                <Columns>  
                    <asp:TemplateField HeaderText="Audit <br />Number" >  
                       <ItemStyle HorizontalAlign="Center"></ItemStyle>
                       <ItemTemplate>  
                           <asp:Label ID="I_Open_AuditNbr" runat="server" Width="60px" Text='<%#Eval("Audit_Number") %>'></asp:Label>  
                       </ItemTemplate>  
                       <EditItemTemplate>  
                           <asp:Label ID="EI_Open_AuditNbr" runat="server" Width="60px" Text='<%#Eval("Audit_Number") %>'></asp:Label>  
                       </EditItemTemplate>  
                       <FooterTemplate>  
                           <asp:TextBox ID="F_Open_AuditNbr" runat="server" Width="60px" ></asp:TextBox>  
                       </FooterTemplate>
                    </asp:TemplateField>                    

                        ETC....

                </Columns>  

            </asp:GridView>
            <asp:Label ID="lblEmpty1" runat="server" Visible="false" Style="font-weight:bold; font-size:large;"></asp:Label>
        </div>
    </asp:Panel>
  </div>
</asp:Content>

打开
源文件暂挂
发送到CSE
送交审计员
分配
向技术委员会提出的问题
等

你试过了吗,emm,
overflow-x:scroll?另外,你想滚动什么,内部分区的内容,面板还是外部分区的内容?@Andrei-没有乐趣o(我想滚动包含Gridview的div。实际上,我只想滚动Gridview,但我知道它需要在div内部才能完成。使用Firebug或Chrome Dev工具等工具检查标记,我很确定您的溢出设置在错误的标记上。内部div本身很宽,但面板a外部分区可能会更窄,因此会剪切内容。您可能需要将此设置应用于其中一个分区,而不是这最终会有所帮助。结果是两个分区都需要溢出。呃……无论如何,感谢您将我推向正确的方向。