Gridview Paging without a Datasource Control
Posted by David Wier on 02/8/10 | Tips and Tricks
If you are populating your Gridview with code, and not through a DataSource control, to be able to add paging, along with the ‘AllowPaging=True’ property, merely add a PageIndexChanging event for the Gridview:
Protected SubYourGridview_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs)
YourGridview.PageIndex = e.NewPageIndex
YourGridview.DataBind()
End Sub