Zaloguj | Zarejestruj | FAQ
Anonymous

How to add virtical scroll bar in gridview?

+ Odpowiedz

Posty: 5 Strona 1 z 1


How to add virtical scroll bar in gridview?

przez confidence123 » Śr paź 22, 2014 5:54 am

Plz give the proper solution..
Avatar użytkownika

confidence123

  • Posty: 7
  • Dołączył(a): Pn paź 13, 2014 4:38 am

Re: How to add virtical scroll bar in gridview?

przez XainPro » Pn paź 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 użytkownika

XainPro

  • Posty: 3933
  • Dołączył(a): Pt lut 17, 2012 8:10 pm

Re: How to add virtical scroll bar in gridview?

przez Farhin Qureshi » Pn sty 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 użytkownika

Farhin Qureshi

  • Posty: 45
  • Dołączył(a): Wt sty 03, 2017 11:33 am
--
Farhin Qureshi
.NET Developer
http://www.ifourtechnolab.com

Re: How to add virtical scroll bar in gridview?

przez Rdube123 » Pt lis 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 użytkownika

Rdube123

  • Posty: 1
  • Dołączył(a): Pt lis 17, 2017 6:51 am

Re: How to add virtical scroll bar in gridview?

przez Samantha14 » Pn wrz 03, 2018 8:18 am

XainPro napisał(a):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 użytkownika

Samantha14

  • Posty: 10
  • Dołączył(a): Pn wrz 03, 2018 6:46 am


+ Odpowiedz

Strona 1 z 1

cron