2014年7月13日 星期日

[RESOLVED] problem in Page Load


i have used 3 gridview in a page 3 function to put data in gridview and put all the functions in page load but the problem is that paging  is not working properly.



Have you getting any error ?


Have you did the following thing


1. Need you register pagechanging event of grid views


2. Need to rebind the Page changing event by setting new page ID before you bind grid in event as following


protected void CustomersGridView_PageIndexChanging(Object sender, GridViewPageEventArgs e)
{

gridView.PageIndex = e.NewPageIndex;

//Rebind the grid here

}







hello 


Devinder 


you need to create 


protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
//bind your grid after this call function to bind grids

bindgrid();


}

and grid view markup would be like this


            PageSize="8" AllowPaging="true" 
onpageindexchanging="GridView1_PageIndexChanging">





For more info









沒有留言:

張貼留言