Using jQuery Scrollable Gridview with fixed headers in asp.net [100% Solved]

1st. Download ScrollableGridPlugin.js

<head runat=”server”>
<script src=”Scripts/jquery-1.4.1.min.js” type=”text/javascript”></script>
<script src=”Scripts/ScrollableGridPlugin.js” type=”text/javascript”></script>
<title></title>

<script type=”text/javascript”>

$(document).ready(function () {
$(‘#<%=gvResultEntry.ClientID %>’).Scrollable();
}
)
</script>

</head>

<asp:Panel ID=”pnlSubmitForm” runat=”server” ScrollBars=”Vertical” Height=”650px”
Width=”1800px”>
<div align=”left”>

// Grid View…. width of the grid view needed to be 100% else header and data column will not match….

</div>

</asp:Panel>

gvResultEntry.DataSource = dt;
gvResultEntry.DataBind();
gvResultEntry.UseAccessibleHeader = true;
gvResultEntry.HeaderRow.TableSection = TableRowSection.TableHeader;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s