Suppose you are not setting predefined data source means you are not using sqldatasource as the data source then this article is helpful for enabling the paging option. Suppose you will determine data source at run-time means you are using SqldataAdapter then u are welcome:
In the html code of Gridview you have to set AllowPaging="true"
Here is the code for handling paging manualy:
protected void TestGV_pageIndexChanging(object sender, GridViewPageEvent e)
{
TestGV.pageIndex=e.NewPageIndex;
TestGV.dataBind();
}
Here we see page index is updated as the index of page changes. By default page size=10 however it can be changed in the html code of Gridview.
Thats for today
Masud (15.7.9)
No comments:
Post a Comment