Login | Register | FAQ
Anonymous

How to add virtical scroll bar in gridview?

+ Post a reply

5 posts Page 1 of 1


How to add virtical scroll bar in gridview?

by confidence123 » Wed Oct 22, 2014 5:54 am

Plz give the proper solution..
User avatar

confidence123

  • Posts: 7
  • Joined: Mon Oct 13, 2014 4:38 am

Re: How to add virtical scroll bar in gridview?

by XainPro » Mon Oct 27, 2014 7:29 am

You can put it inside a div like this:

<div style="width: 100%; height: 400px; overflow: scroll">your GridView</div>
User avatar

XainPro

  • Posts: 3933
  • Joined: Fri Feb 17, 2012 8:10 pm

Re: How to add virtical scroll bar in gridview?

by Farhin Qureshi » Mon Jan 23, 2017 10:35 am

Hi,

You can add vertical scroll bar in gridview using this below link.

http://www.aspsnippets.com/Articles/Add-vertical-scrollbar-to-GridView-in-ASPNet.aspx

Thanks.
User avatar

Farhin Qureshi

  • Posts: 45
  • Joined: Tue Jan 03, 2017 11:33 am
--
Farhin Qureshi
.NET Developer
http://www.ifourtechnolab.com

Re: How to add virtical scroll bar in gridview?

by Rdube123 » Fri Nov 17, 2017 7:04 am

Here I write a code to explain how to add Virtical scroll bar in gridview:
HTML Markup
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="up" runat="server">
<ContentTemplate>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:BoundField DataField="ContactName" HeaderText="Contact Name" />
<asp:BoundField DataField="City" HeaderText="City" />
<asp:BoundField DataField="Country" HeaderText="Country" />
</Columns>
</asp:GridView>
<asp:Button ID="Button1" runat="server" Text="Refresh" />
</ContentTemplate>
</asp:UpdatePanel>
Applying the Scrollable Grid jQuery Plugin

<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="Scripts/ScrollableGridViewPlugin_ASP.NetAJAXmin.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#<%=GridView1.ClientID %>').Scrollable({
ScrollHeight: 300,
IsInUpdatePanel: true
});
});
</script>
User avatar

Rdube123

  • Posts: 1
  • Joined: Fri Nov 17, 2017 6:51 am

Re: How to add virtical scroll bar in gridview?

by Samantha14 » Mon Sep 03, 2018 8:18 am

XainPro wrote:You can put it inside a div like this:

<div style="width: 100%; height: 400px; overflow: scroll">your GridView</div>


I tried your solution and it worked well for desktop version of my site. But for some reason it is not working on my site's mobile version.

Can you tell me why?




----------------------------------------------------
https://www.netguru.co/services
User avatar

Samantha14

  • Posts: 10
  • Joined: Mon Sep 03, 2018 6:46 am


+ Post a reply

Page 1 of 1