GridView different Page view problem – Visual Studio, ASP.NET
definition of question are as follows: [HttpException (0x80004005): The GridView 'GridViewsearch' fired event PageIndexChanging which wasn't handled.] System.Web.UI.WebControls.GridView.OnPageIndexChanging(GridViewPageEventArgs e) +1495955 System.Web.UI.WebControls.GridView.HandlePage(Int32 newPage) +83 System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +467 System.Web.UI.WebControls.GridView.RaisePostBackEvent(String eventArgument) +199 System.Web.UI.WebControls.GridView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +177 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746

Software/Hardware used:
Asp.net 3.5 version, visual studio 2008
ASKED: February 7, 2010  5:57 AM
UPDATED: February 8, 2010  2:15 PM

Answer Wiki:
You need to manage the PageIndexChanging event of your datagrid, and add some code in it to assign the new page index, and bind the datasource to the control. Something like this: <pre> Protected Sub GridView1_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles GridView1.PageIndexChanging GridView1.PageIndex = e.NewPageIndex GridView1.DataBind() End Sub</pre>
Last Wiki Answer Submitted:  February 8, 2010  2:15 pm  by  carlosdl   63,535 pts.
All Answer Wiki Contributors:  carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _