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