/// <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() { cf_DataGridViewMaskedTextCell cell = base.Clone() as cf_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 cf_DataGridViewMaskedTextCell cell = dataGridView.CurrentCell as cf_DataGridViewMaskedTextCell; if (cell != null) { Mask = cell.Mask; } }