/// <summary>
        /// Creates a copy of a DGV-MaskedTextCell containing the DGV-Cell properties.
        /// </summary>
        /// <returns>Instance of a DGV-MaskedTextCell using the Mask string.</returns>
        public override object Clone()
        {
            DataGridViewMaskedTextCell cell = base.Clone() as DataGridViewMaskedTextCell;

            cell.Mask = this.Mask;
            return(cell);
        }
        public void ApplyCellStyleToEditingControl(
            DataGridViewCellStyle dataGridViewCellStyle)
        {
            Font = dataGridViewCellStyle.Font;
            //	get the current cell to use the specific mask string
            DataGridViewMaskedTextCell cell
                = dataGridView.CurrentCell as DataGridViewMaskedTextCell;

            if (cell != null)
            {
                Mask = cell.Mask;
            }
        }
        private void CarregaGridViewParametros()
        {
            dgParametros.Rows.Clear();
            foreach (var param in _parametros)
            {
                var row = new DataGridViewRow();

                var nome = new DataGridViewTextBoxCell { Value = param.ParameterName };
                var valor = new DataGridViewMaskedTextCell { Value = param.ParameterValue };
                var defineNull = new DataGridViewCheckBoxCell { Value = param.DefineNull };
                var lista = new DataGridViewComboBoxCell { DataSource = _tiposDadosParametros, DisplayMember = "Key", ValueMember = "Value", Value = "System.Object|" };
                row.Cells.Add(nome);
                row.Cells.Add(defineNull);
                row.Cells.Add(lista);
                row.Cells.Add(valor);

                dgParametros.Rows.Add(row);
            }
        }