views:

1090

answers:

1

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.

A: 

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"
Muhammad Akhtar
AllowPaging is set to True.
If an answer wasn't the solution, you don't need to accept it (unless you're trying to improve your accept rate).
rlb.usa