PDA

View Full Version : سوال: معنی این پیغام خطا واسه دیتا گرید چیه؟



mahyar501
شنبه 26 اسفند 1391, 13:06 عصر
سلام بر دوستان عزیز. من یه دیتا گرید رو صفحه بندی کردم، وقتی روی شماره صفحه کلیک میکنم این پیغام رو میده:

The GridView 'GridView_std' fired event PageIndexChanging which wasn't handled.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The GridView 'GridView_std' fired event PageIndexChanging which wasn't handled.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): The GridView 'GridView_std' fired event PageIndexChanging which wasn't handled.]
System.Web.UI.WebControls.GridView.OnPageIndexChan ging(GridViewPageEventArgs e) +1322358
System.Web.UI.WebControls.GridView.HandlePage(Int3 2 newPage) +86
System.Web.UI.WebControls.GridView.HandleEvent(Eve ntArgs e, Boolean causesValidation, String validationGroup) +464
System.Web.UI.WebControls.GridView.RaisePostBackEv ent(String eventArgument) +207
System.Web.UI.WebControls.GridView.System.Web.UI.I PostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

fakhravari
شنبه 26 اسفند 1391, 15:14 عصر
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) {
GridView1=dt
GridView1.PageIndex = e.NewPageIndex;
GridView1 = Bind }

mahyar501
یک شنبه 27 اسفند 1391, 14:55 عصر
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) {
GridView1=dt
GridView1.PageIndex = e.NewPageIndex;
GridView1 = Bind }

ببخشید من دقیق متوجه نشدم چیکار باید بکنم. میشه یکم توضیح بدین؟ ممنون

Saber_Fatholahi
دوشنبه 28 اسفند 1391, 22:52 عصر
ببخشید من دقیق متوجه نشدم چیکار باید بکنم. میشه یکم توضیح بدین؟ ممنون

باید رویداد PageIndexChanging کنترل گرید را بازنویسی نمایید.
همانگونه که اقای فخراوی فرمودن

fakhravari
سه شنبه 29 اسفند 1391, 04:24 صبح
این sqldatasourse هم برای خودش غولی.
چیزی که کد نویسی درست میکنیم باید کل event ها رو مقدار بدیم.