Habanero.Faces.Win.EditableGridWin.ConfirmRowDeletion C# (CSharp) Method

ConfirmRowDeletion() private method

If deletion is to be confirmed, checks deletion with the user before continuing. This applies only to the default delete behaviour where a full row is selected by clicking on the column.
private ConfirmRowDeletion ( object sender, System.Windows.Forms.DataGridViewRowCancelEventArgs e ) : void
sender object
e System.Windows.Forms.DataGridViewRowCancelEventArgs
return void
        private void ConfirmRowDeletion(object sender, DataGridViewRowCancelEventArgs e)
        {
            try
            {
                CheckRowEvent(e);
                if (ConfirmDeletion && !CheckUserConfirmsDeletionDelegate())
                {
                    e.Cancel = true;
                    return;
                }
                var rowObjectIDValue = GetRowObjectIDValue(e.Row);
                IBusinessObject businessObject = this.DataSetProvider.Find(rowObjectIDValue);
                if (businessObject == null)
                {
                    //this.RefreshGrid();
                    //GlobalUIRegistry.ControlFactory.ShowMessageBox(
                    //    "There was a problem deleting the selected item please try again");

                    _logger.Log("ConfirmRowDeletion - Row Index :" + e.Row.Index + " - No business object found", LogCategory.Debug);
                    e.Cancel = true;
                    return;
                }
                string message;
                if (!businessObject.IsDeletable(out message))
                {
                    e.Cancel = true;
                    throw new BusObjDeleteException(businessObject, message);
                }
            }
            catch (Exception ex)
            {
                GlobalRegistry.UIExceptionNotifier.Notify(ex, "", "Error ");
            }
        }