Identificarse | Registrarse | FAQ
Anonymous

How to add virtical scroll bar in gridview?

+ Publicar una respuesta

5 mensajes Página 1 de 1


How to add virtical scroll bar in gridview?

por confidence123 » Mié Oct 22, 2014 5:54 am

Plz give the proper solution..
Avatar de Usuario

confidence123

  • Mensajes: 7
  • Registrado: Lun Oct 13, 2014 4:38 am

Re: How to add virtical scroll bar in gridview?

por XainPro » Lun 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>
Avatar de Usuario

XainPro

  • Mensajes: 3933
  • Registrado: Vie Feb 17, 2012 8:10 pm

Re: How to add virtical scroll bar in gridview?

por Farhin Qureshi » Lun Ene 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.
Avatar de Usuario

Farhin Qureshi

  • Mensajes: 45
  • Registrado: Mar Ene 03, 2017 11:33 am
--
Farhin Qureshi
.NET Developer
http://www.ifourtechnolab.com

Re: How to add virtical scroll bar in gridview?

por Rdube123 » Vie 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>
Avatar de Usuario

Rdube123

  • Mensajes: 1
  • Registrado: Vie Nov 17, 2017 6:51 am

Re: How to add virtical scroll bar in gridview?

por Samantha14 » Lun Sep 03, 2018 8:18 am

XainPro escribió: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
Avatar de Usuario

Samantha14

  • Mensajes: 10
  • Registrado: Lun Sep 03, 2018 6:46 am


+ Publicar una respuesta

Página 1 de 1