private void SetSelectedRow()
        {
            if (AllowSelectionsMultiples)
            {
                Records = ViewResult
                          .GetSelectedRows()
                          .Select(rowHandle => ViewResult.GetDataRow(rowHandle))
                          .ToArray();

                if (Records.IsEmpty())
                {
                    throw new Exception("Selecione um item na linha!");
                }

                Record = Records[0];
            }
            else
            {
                if (ViewResult.FocusedRowHandle < 0)
                {
                    throw new Exception("Selecione um item na linha!");
                }

                Record = ViewResult.GetFocusedDataRow();
            }

            DialogResult = DialogResult.OK;
            Close();
        }