user187707
user187707

Reputation:

Asp.net - How to introduce scrolling in gridview control

I am using Vb.net for coding. I have a grid view control in which i want to introduce a vertical scroll bar if the value from the sql query overflows. How do I go about it?

Upvotes: 0

Views: 6804

Answers (2)

Yuriy Faktorovich
Yuriy Faktorovich

Reputation: 68687

You could place the gridview in a div with the following style:

overflow: auto; height: 80px;.

Upvotes: 2

Carl Rippon
Carl Rippon

Reputation: 4673

The following markup should do this. You'll need to change the height as required.

    <div style="overflow-y:auto; height:200px">
        <asp:GridView ID="GridView1" runat="server" > 
        </asp:GridView>
    </div>

Upvotes: 1

Related Questions