void MultiFlip()
        {
            if (dgOpenTransactionGrid.SelectedItem == null)
            {
                return;
            }
            DebtorTransOpenClientExtended   selecteddto = null;
            CreditorTransOpenClientExtended selectedcto = null;

            selecteddto = dgOpenTransactionGrid.SelectedItem as DebtorTransOpenClientExtended;
            var rowIndex = dgOpenTransactionGrid.tableView.FocusedRowHandle;

            if (selecteddto != null)
            {
                bool isChecked = selecteddto.IsChecked;
                selecteddto.IsChecked = !selecteddto.IsChecked;
                CheckBoxClicked(selecteddto);
                for (int i = rowIndex - 1; i > 0; i--)
                {
                    var row = dgOpenTransactionGrid.GetRow(i) as DebtorTransOpenClientExtended;
                    if (row?.IsChecked == isChecked)
                    {
                        row.IsChecked = !row.IsChecked;
                        CheckBoxClicked(row);
                    }
                    else
                    {
                        break;
                    }
                }
            }
            else
            {
                selectedcto = dgOpenTransactionGrid.SelectedItem as CreditorTransOpenClientExtended;
                bool isChecked = selectedcto.IsChecked;
                selectedcto.IsChecked = !selectedcto.IsChecked;
                CheckBoxClicked(selectedcto);
                for (int i = rowIndex - 1; i > 0; i--)
                {
                    var row = dgOpenTransactionGrid.GetRow(i) as CreditorTransOpenClientExtended;
                    if (row?.IsChecked == isChecked)
                    {
                        row.IsChecked = !row.IsChecked;
                        CheckBoxClicked(row);
                    }
                    else
                    {
                        break;
                    }
                }
            }
        }
        void FlipSelection()
        {
            if (dgOpenTransactionGrid.SelectedItem == null)
            {
                return;
            }
            DebtorTransOpenClientExtended   selecteddto = null;
            CreditorTransOpenClientExtended selectedcto = null;

            selecteddto = dgOpenTransactionGrid.SelectedItem as DebtorTransOpenClientExtended;
            if (selecteddto != null)
            {
                selecteddto.IsChecked = !selecteddto.IsChecked;
                CheckBoxClicked(selecteddto);
            }
            else
            {
                selectedcto           = dgOpenTransactionGrid.SelectedItem as CreditorTransOpenClientExtended;
                selectedcto.IsChecked = !selectedcto.IsChecked;
                CheckBoxClicked(selectedcto);
            }
        }