DataObjectBase IEditable.BeginEdit

Topics: Feature requests
Jun 18, 2012 at 6:31 PM

Hi Geert,

i stumbled about this issue when binding to telerik controls.

i always get the InvalidOperationException "BeginEdit cannot be invoked twice. A call to BeginEdit must always be closed with a call to CancelEdit or EndEdit."

because the controls are subsequent calling BeginEdit.

MSDN says the following (default/standard behavior):

"If BeginEdit is called on an object that is already beeing edited, the second and subsequent calls are ignored."

Would it be possible to adjust the DataObjectBase to this default behavior?

A simple quick fix would be to override the following method:

        protected override void OnBeginEdit(System.ComponentModel.BeginEditEventArgs e)
            e.IgnoreDoubleCall = true;

Many Thanks!
Jun 18, 2012 at 6:33 PM

Yep, sounds fair.

Jun 18, 2012 at 6:45 PM


Jun 18, 2012 at 7:59 PM

Thanks a lot for this fast fix :-)