• Register
2 votes
96 views

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?

8 5 2
3,230 points

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)
    {
        getBuildData();
    }

Within your Page_Load Method

Hope the solutions helped you.

8 4 1
5,680 points

Related questions

0 votes
1 answer 4 views
4 views
Problem: Can some one help me with this? fired event sorting which wasn’t handled
asked Mar 19 PkGuy 13.1k points
0 votes
1 answer 26 views
26 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 71 views
71 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 5 views
5 views
Problem: How to export gridview to excel in asp net. help me to done this.
asked Mar 19 charles mathews 5.5k points
0 votes
1 answer 8 views
8 views
Problem: The service call returns the message: System.ServiceModel.ServiceActivationException: The requested service, 'http://localhost:83/ABCStaticData/StaticDataService.svc' could not be activated. See the server's diagnostic trace logs for more information.
asked Mar 20 ummesalma 24.5k points
0 votes
1 answer 3 views
3 views
Problem: I wrote this code. The code contains the expected runat="server" attribute, but it is giving me this error message: error on hiddenfield So what might be causing this error?
asked Mar 20 ummesalma 24.5k points
0 votes
1 answer 2 views
2 views
Problem: it gives me this error: &ldquo;The specified network password is not correct.&rdquo; exception when changing a users password How can I make it work?
asked Mar 20 ummesalma 24.5k points
0 votes
1 answer 7 views
7 views
Problem: For some reason the group creation works fine and shows as success in the Event Viewer, but when it tries to run the PowerShell script, I get the following error: The user has not been granted the requested logon type at this machine.
asked Mar 20 ummesalma 24.5k points
0 votes
1 answer 5 views
5 views
Problem: I have a web project in my solution file that is "unavailable" when I open the solution. When I right-click on the web project and reload the project, I get the following error: The Web Application Project mycompany.myapp.mywebproject is configured to use IIS. The Web Server 'http://localhost/MyWebApp could not be found.
asked Mar 20 ummesalma 24.5k points
0 votes
1 answer 5 views
5 views
Problem: The error looks like this when I run a 'debug': Incorrect syntax near 't'. Unclosed quotation mark after the character string ')'.
asked Mar 16 ummesalma 24.5k points