Click here to Skip to main content
14,210,351 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hello,

Attempting to add a scrollbar to a datagrid but to no avail. I have tried both the Div tag and Panel. Here are some of the variations:
<div style="vertical-align:top; height: 52px; overflow:auto; width:300px;">

<div style="height: 52px; overflow:scroll; width:300px;">

<asp:Panel runat="server" style="overflow:scroll; width:85%; height:300px;"> 

<asp:Panel ScrollBars="Auto" runat="server" Wrap="true">

<asp:Panel runat="server" style="overflow:scroll; width:300px; height:50px; vertical-align:;"> 

<asp:DataGrid id="grdCharges" 

                style="z-index:101; left:40px; top:384px; font-family:'Arial'; font-size:9pt; position:absolute;" 

                runat="server" Width="654" Height="97px" AutoGenerateColumns="False" 

                BorderStyle="NotSet" CssClass="GridAppearanceStyle" HeaderStyle-CssClass="GridHeaderStyle" ItemStyle-CssClass="GridItemStyle">
    <ItemStyle CssClass="GridItemStyle" />
    <Columns>
        <asp:BoundColumn DataField="Account_No" HeaderText="Account_No">
        </asp:BoundColumn>
        ......
        <asp:ButtonColumn CommandName="Select" HeaderText="row_selector" Text="Select">
        </asp:ButtonColumn>
    </Columns>
    <HeaderStyle BackColor="Control" />
</asp:DataGrid>
</div>
<!--</Panel>-->



The scrollbar does appear but not adjacent to the grid. It show on top of other controls in the web page.


Any help is appreciated.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Cookies | Terms of Service
Web02 | 2.8.190618.1 | Last Updated 12 Jul 2014
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100