• Register
2 votes

Problem :

I am very new to GridView.I have already written one row Editing function to catch every edits but still my page always shows me below error.

The gridview 'gridview1' fired event rowediting which wasn't handled.

Above listed unhandled exception which was generated while a execution of a current web request. You can find the more information related to the origin of the exception and the location of it can be easily identified by somebody who is expert in it using the exception stack trace given below for your reference.

Stack Trace for your reference:

HttpException (0x80004005): The GridView 'gridview1' fired event RowEditing which wasn't handled.
System.Web.UI.WebControls.GridView.OnRowEditing(GridViewEditEventArgs e) +1588857 System.Web.UI.WebControls.GridView.HandleEdit(Int32 rowIndex) +43
System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +611
System.Web.UI.WebControls.GridView.RaisePostBackEvent(String eventArgument) +205
System.Web.UI.WebControls.GridView.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9643314 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724

How to fix this?

3.2k points
edited by

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I have faced this before so I can give you multiple solutions on this exception. Please refer below solutions for you.

Easiest way to fix it by simply adding the empty event as shown below

protected void mygrd_RowDeleting(object mysender, GridViewDeleteEventArgs mye)



If above solution is not working for you then you can try below solution

If the gridview binding is in the pageload. Then I guess this may be the cause of the issue. So you need to just move your GV binding as shown below

if (!Page.IsPostBack)

Within your Page_Load Method

Hope the solutions helped you.

5.7k points

Related questions

0 votes
1 answer 46 views
Problem: Can some one help me with this? fired event sorting which wasn’t handled
asked Mar 19 PkGuy 25.9k points
0 votes
1 answer 16 views
Problem: Is this something that happens to other people: The gridview 'gridview1' fired event rowdeleting which wasn't handled?
asked Jun 17 akhi 125k points
0 votes
1 answer 3 views
Problem: Where can I get assistance: The gridview gridview1 fired event sorting which wasn t handled?
asked Jun 21 akhi 125k points
0 votes
1 answer 90 views
Problem Both datasource and datasourceid are defined on 'gridview1'. remove one definition.
asked Feb 8 charles mathews 5.5k points
0 votes
1 answer 8 views
Problem: Has anyone had this complication before : The gridview gridview1 fired event pageindexchanging which wasn t handled?
asked Jun 16 nila 121k points
0 votes
1 answer 15 views
Problem: Can someone please help fix this > What happens when you click the edit button for a row in a gridview control?
asked May 1 ummeshani 10.8k points
0 votes
1 answer 3 views
Problem: Please assist if anyone understands the problem: The gridview fired event sorting which wasn t handled
asked Jun 26 asha 121k points
0 votes
1 answer 110 views
Problem : I am facing below error if I try to export datagrid to the excel. &ldquo;Control 'gridview1' of type 'gridview' must be placed inside a form tag with runat=server.&rdquo; Please find below my code : <form runat="server" id="form1"> <div runat="server" id=" ... TextBox> </form> My GridView is within the from tag with the runat="server", but still I am facing above error. How to fix this?
asked Feb 17, 2020 mphil 2.3k points
0 votes
1 answer 6 views
Problem : Fired event sorting which was not handled
asked Jul 18 Sifat55 108k points
0 votes
1 answer 6 views
Problem: Can anyone assist me with this issue : To create an object data source that provides for sorting, you must always?
asked Jun 16 Rada Gracelynn 104k points