protected override void CommitEdit() { if (DataForm != null && DataForm.ValidateItem()) { if (commitEditOp(DataForm.CurrentItem)) { DataForm.CommitEdit(); (DataForm.ParentOfType <RadWindow>()).DialogResult = true; (DataForm.ParentOfType <RadWindow>()).Close(); } } }
public void EnsureBeginEditThenEndEditDoesNotRaiseException() { DataForm df = new DataForm(); df.CurrentItem = new DataClass(); df.BeginEdit(); bool success = false; try { df.CommitEdit(true /* exitEditingMode */); success = true; } catch (NullReferenceException) { } Assert.IsTrue(success); }