private void CancelRow(System.Object sender, EventArgs e)
        {
            if (FPreviouslySelectedDetailRow == null)
            {
                MessageBox.Show(Catalog.GetString("Select the row to cancel first"));
                return;
            }

            TFrmGLBatch MainForm = (TFrmGLBatch)this.ParentForm;

            try
            {
                MainForm.FCurrentGLBatchAction = TGLBatchEnums.GLBatchAction.CANCELLING;

                int currentlySelectedRow = grdDetails.GetFirstHighlightedRowIndex();

                if (FCancelLogicObject.CancelBatch(FPreviouslySelectedDetailRow))
                {
                    //Reset row to fire events
                    SelectRowInGrid(currentlySelectedRow);
                    UpdateRecordNumberDisplay();

                    //If no row exists in current view after cancellation
                    if (grdDetails.Rows.Count < 2)
                    {
                        EnableButtonControl(false);
                        ClearDetailControls();
                    }
                }
            }
            finally
            {
                MainForm.FCurrentGLBatchAction = TGLBatchEnums.GLBatchAction.NONE;
            }
        }
        /// <summary>
        /// Cancel a batch (there is no deletion of batches)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CancelRow(System.Object sender, EventArgs e)
        {
            int newCurrentRowPos = grdDetails.GetFirstHighlightedRowIndex();

            if (FCancelLogicObject.CancelBatch(FPreviouslySelectedDetailRow, txtDetailBatchDescription))
            {
                SelectRowInGrid(newCurrentRowPos);
            }

            //If some row(s) still exist after deletion
            if (grdDetails.Rows.Count < 2)
            {
                EnableButtonControl(false);
                ClearDetailControls();

                ((TFrmGLBatch)ParentForm).DisableJournals();
                ((TFrmGLBatch)ParentForm).DisableTransactions();
            }
        }
        /// <summary>
        /// Cancel a batch (there is no deletion of batches)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CancelRow(System.Object sender, EventArgs e)
        {
            int CurrentRowPos = grdDetails.GetFirstHighlightedRowIndex();

            if (FCancelLogicObject.CancelBatch(FPreviouslySelectedDetailRow))
            {
                //Reset row to fire events
                SelectRowInGrid(CurrentRowPos);

                //The current Batch is still selected, so disable
                //((TFrmGLBatch)ParentForm).DisableJournals();
                //((TFrmGLBatch)ParentForm).DisableTransactions();
            }

            //If no row exists in current view after cancellation
            if (grdDetails.Rows.Count < 2)
            {
                EnableButtonControl(false);
                ClearDetailControls();
            }
        }