Ajay
Ajay

Reputation: 33

i want to add vertical scrollbar to gridview in asp.net

i have bound data into a grid view in my asp.net application. i have inserted pagging into it but instead i want to add scroll bar to avoid long pagging.

This is my grid view code:

<div class="box-content" style="min-height: 170px">
<asp:GridView ID="gvVenFileQA" runat="server" AutoGenerateColumns="False" 
EnableModelValidation="True"
ShowHeader="true" Width="100%" CssClass="altrowstable" AllowPaging="true" 
EmptyDataText="No Data Available !"
PageSize="5" OnPageIndexChanging="gvVenFileQA_PageIndexChanging" 
OnRowDataBound="gvVenFileQA_RowDataBound"
OnSelectedIndexChanged="gvVenFileQA_SelectedIndexChanged" 
DataKeyNames="ID,RUN_ID">
<Columns>

I don't want to add scrolling into the outer tag but to the inside bound data. Please suggest

Upvotes: 0

Views: 4324

Answers (1)

wazz
wazz

Reputation: 5058

CSS:

.box-content { max-height: 200px; overflow: scroll; }

Upvotes: 1

Related Questions