@{
var gridUser = new WebGrid(canPage: true, defaultSort: "CreatedOn", rowsPerPage: 5,
ajaxUpdateContainerId: "Divxyz");
gridUser.Bind(Model.abc, rowCount: Model.User.Count(), autoSortAndPage: true);
gridUser.Pager(WebGridPagerModes.All);
}
<div id="Divxyz" style="display: none">
I am using a mvc3 webgrid with ajax paging … I figured out my solution to do ajax Paging as above.
BUT ….. My grid is at bottom of the page and When I click on page number(It shows # as its linking page), it takes me to top of page moving grid to bottom of page again for every page number click. Please help me on this.
Thanks In Advance
.
I figured out the solution for the issue.
I added below script and when I click on page number page doesnt scroll