Question

I have a GridView in an UpdatePanel (ASP.Net 2.0) .

I have this code for the PageIndexChanging method of the grid view:

   protected void grdProductSearch_PageIndexChanging(object sender, GridViewPageEventArgs e)
   {
            grdProductSearch.PageIndex = e.NewPageIndex;
            grdProductSearch.DataBind();
   }

For the UpdatePanel, in the Triggers collection I have added the GridView and the PageIndexChanging method for the EventName.

Yet, the grid displays data correctly but there is no response when I click the page numbers at the bottom. What am I doing wrong?

Thanks.

Was it helpful?

Solution

Since your gridview in the updatepanel, No need to add trigger for paging

--In PageIndexchanging event, where you bind data to grid, make sure, data is again fetched from the DB

--Make sure gridview paging is enable...

AllowPaging="True"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top