// Override the Clone method so that the Enabled property is copied.
        public override object Clone()
        {
            DataGridViewExComboBoxCell cell =
                (DataGridViewExComboBoxCell)base.Clone();

            return(cell);
        }
        void _columnComboBox_Leave(object sender, EventArgs e)
        {
            DataGridViewExComboBoxCell cell = this.DataGridView.CurrentCell as DataGridViewExComboBoxCell;

            if (cell != null)
            {
                cell.Value = _columnComboBox.Text;

                if (_columnComboBox.SelectedItem != null)
                {
                    cell.SelectValue = _columnComboBox.SelectedItem;
                }
                else
                {
                    cell.SelectValue = cell.Value;
                }

                HideComboBox();
            }
        }