To get SharePoint to handle paging in your webparts which are using GridView (SPGridView) you need to do a few tweaks to your code:Just above your grid.DataBind() you need to insert the following code:// Turn on paging and add event handlergrid.PageSize = 10;grid.AllowPaging = true;grid.PageIndexChanging +=new GridViewPageEventHandler(grid_PageIndexChanging);then add the event handler:void
No comments:
Post a Comment