The GridView 'gv 'fired event RowEditing which wasn' t handled.

Source: Internet
Author: User

I haven't written the gridview Event code for a long time. I just wrote a rowcommand event and the following error occurs:

The GridView 'gv 'fired event RowEditing 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 'gv 'fired event RowEditing 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.

Find the cause and find that you want to add the following event RowEditing:

. Aspx:
<Asp: GridView ID = "GridView1" runat = "server" OnRowEditing = "Editing">
<Columns>
<Asp: CommandField ShowEditButton = "true"/>
</Columns>
</Asp: GridView>

. Cs:
Protected void Editing (object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e. NewEditIndex;

}

Other events, such as Delete, Cancel, and Update, are similar.

Programming skills are the same as tools. If you don't need them for a long time, they will rust. Note ~~~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.