cancel edit in formview

Posted on 2006-04-16
Last Modified: 2011-10-03
In ASP.NET 2.0 the gridview has an event of RowEditing that consist of a parameter  of type GridViewEditEventArgs
which allow to cancel the update of a row if we want by the command e.Cancel = true.
Is there a cancel property like this in the formvie? I would like when I am in the Edit situation not to update the row.
Question by:ANAT2403
    LVL 2

    Accepted Solution

    The formview has an event called ItemUpdating which for its event arguments takes a type "FormViewUpdateEventArgs"

    FormViewUpdateEventArgs has a Cancel property that when set to true will cancel the update operation.

    Author Comment

    It works great and it does not update the database which is what I want , but the changes are left in the screen. How do I fire the event of cancel so that the changes in the screen will be deleted?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now