PDA

View Full Version : پیغام خطا هنگام کلیک بر روی صفحات گرید



bashiry
چهارشنبه 03 مرداد 1386, 12:16 عصر
سلام
من یه گرید تو صفحه گذاشتم و دو ستون داره یکی از ستونها رو سفارشی کردم

حالا خاصیت paging هم فعاله.

مشکل اینجاست که صفحه اول رو خوب نشون میده به محض اینکه یه صفحه دیگر رو کلیک می کنم پیغام زیر میاد!
نمیدونم باید چکارش کرد؟





The GridView 'GridView1' 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 'GridView1' 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 'GridView1' fired event PageIndexChanging which wasn't handled.]
System.Web.UI.WebControls.GridView.OnPageIndexChan ging(GridViewPageEventArgs e) +1427379
System.Web.UI.WebControls.GridView.HandlePage(Int3 2 newPage) +83
System.Web.UI.WebControls.GridView.HandleEvent(Eve ntArgs e, Boolean causesValidation, String validationGroup) +488
System.Web.UI.WebControls.GridView.RaisePostBackEv ent(String eventArgument) +199
System.Web.UI.WebControls.GridView.System.Web.UI.I PostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +174
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

marzban
پنج شنبه 04 مرداد 1386, 08:18 صبح
دوست عزیز چک کن وضعیت viewstate برابر false نباشه

bashiry
پنج شنبه 04 مرداد 1386, 09:29 صبح
سلام
ممنونم ولی این مقدار True هست

peymannaji
پنج شنبه 04 مرداد 1386, 09:55 صبح
مشکلتون اینطوری ببینید حل میشه ؟




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

marzban
پنج شنبه 04 مرداد 1386, 10:12 صبح
معذرت میخوام باید false باشه نه true

bashiry
پنج شنبه 04 مرداد 1386, 11:50 صبح
معذرت میخوام باید false باشه نه true
نه اینم جواب نداد


مشکلتون اینطوری ببینید حل میشه ؟




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


ممنون از همه دوستان مشکل با کد زیر حل شد




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



با تشکر - محمد بشیری

reza69
پنج شنبه 23 بهمن 1393, 19:04 عصر
مشکلتون اینطوری ببینید حل میشه ؟




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

ممنون مشکلم حل شد.