• Register
2 votes
41 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

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
5,680 points

Related questions

0 votes
1 answer 36 views
36 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 mphil 2.3k points
0 votes
1 answer 11 views
11 views
How can you find the mime type of a file based on the file signature, not the extension in .Net? I want a simple way to get a mime type where the file extension is incorrect or not given, something similar?
asked Aug 29 Aliza313 720 points
0 votes
1 answer 8 views
8 views
Problem: I am naive to Asp.Net.I am having a weird looking problem where I am trying to open up my ASP.NET MVC application but I am receiving the below ASP.NET error page which says: Server Error in '/' Application. The resource cannot be found. Description: ... unknown reason to me it seems like it is actually searching for the .aspx file. Please guide me if you think I am missing something.
asked Aug 19 Raphael Pacheco 4.9k points
1 vote
1 answer 10 views
10 views
Problem: I am having fundamental knowledge on C#. Currently I am unable to connect to the HTTPS server with the use of WebRequest as I am facing below error message: "The request was aborted: Could not create SSL/TLS secure channel." I understand that my ... my server never really validates a certificate and it fails with a above error. Kindly guide me in fixing above certificate related error.
asked Jun 30 Raphael Pacheco 4.9k points
0 votes
1 answer 68 views
68 views
Problem : I have recently installed a website on my local machine using IIS 7 successfully. But when I tried to deploy it on the live server, I got a following error: "The page cannot be displayed because an internal server error has occurred" Nothing else. Using a same IIS 7 on live and also set to have the Detailed errors in Error Pages module, but still getting a same. What can be the reason?
asked Jan 28 jwilliam 3.9k points