Welcome to the Xceed Community Sign in | Join | Help
Community Search  

Overriding the CancelEdit event on the DataRow

  •  05-14-2008, 10:21 AM

    Overriding the CancelEdit event on the DataRow

    Hi all,

    I'm trying to override CancelEdit on my implementation of the DataRow:

    public event EventHandler Edit_Cancel;

    public override void CancelEdit()
    {
        base.CancelEdit();

        OnCancelEdit(this, EventArgs.Empty);
    }

    public void OnCancelEdit(object sender, EventArgs args)
    {
        if (Edit_Cancel != null)
        {
            Edit_Cancel(sender, args);
        }
    }

    And I'm trying to catch this event with this Style:

    <Style TargetType="{x:Type local:CustomDataRow}">
        <EventSetter Event="Edit_Cancel" Handler="OnCancelEdit" />
    </Style> 

    But when I try to run this code I get the following error:

    Cannot find DependencyProperty or PropertyInfo for property named 'Edit_Cancel'. Property names are case sensitive.

    Anyone have an idea what I'm missing here?

    Thanks, Frances


    Kiwi wannabe
    Filed under: , , ,
View Complete Thread
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.