private void editButton_Click(object sender, EventArgs e)
    {
      var child = childrenBindingSource.Current as Child;
      if (child != null)
      {
        child.BeginEdit();

        using (var form = new ModalChildEditForm(child))
        {
          MyRoot.DumpEditLevels();
          var result = form.ShowDialog();
          if (result == DialogResult.OK)
          {
            child.ApplyEdit();
          }
          else
          {
            child.CancelEdit();
          }
        }
      }
      MyRoot.DumpEditLevels();
    }
        private void editButton_Click(object sender, EventArgs e)
        {
            var child = childrenBindingSource.Current as Child;

            if (child != null)
            {
                child.BeginEdit();

                using (var form = new ModalChildEditForm(child))
                {
                    MyRoot.DumpEditLevels();
                    var result = form.ShowDialog();
                    if (result == DialogResult.OK)
                    {
                        child.ApplyEdit();
                    }
                    else
                    {
                        child.CancelEdit();
                    }
                }
            }
            MyRoot.DumpEditLevels();
        }