Link to home
Start Free TrialLog in
Avatar of zhshqzyc
zhshqzyc

asked on

Gridview scroll bar

Hello, I have a gridview that has a scroll. When the table has a lot of records. It helps me.
However sometimes the gridview is empty. It also display the scroll. It is ugly.
How to remove it?
I mean dynamically control the scroll.
#gridview
{
    float: right;
    overflow: scroll;
    width: 675px;
}

Open in new window

<div id="gridview">
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" BorderColor="YellowGreen"
                    DataSourceID="SqlDataSource1" AutoGenerateColumns="False" DataKeyNames="ProbId"
                    PageSize="30" AutoGenerateEditButton="True" AutoGenerateDeleteButton="True" Visible="true">

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of BuggyCoder
BuggyCoder
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
try below code

#gridview
{
    float: right;
    overflow: scroll;
    width: 675px;
    height:400px      //whatever height you want.
}

it may helps.