Exemplo n.º 1
0
        public override void InitializeEditingControl(int rowIndex, object
            initialFormattedValue, DataGridViewCellStyle dataGridViewCellStyle)
        {
            // Set the value of the editing control to the current cell value.
            base.InitializeEditingControl(rowIndex, initialFormattedValue,
                                          dataGridViewCellStyle);
            ColorPickerControl ctl = DataGridView.EditingControl as ColorPickerControl;
            _ColorPicker = ctl;

            if (this.Value != null && (this.Value.GetType() == typeof(Color)))
            {
                ctl.Color = (Color)this.Value;
            }
        }
Exemplo n.º 2
0
        public override void InitializeEditingControl(int rowIndex, object
                                                      initialFormattedValue, DataGridViewCellStyle dataGridViewCellStyle)
        {
            // Set the value of the editing control to the current cell value.
            base.InitializeEditingControl(rowIndex, initialFormattedValue,
                                          dataGridViewCellStyle);
            ColorPickerControl ctl = DataGridView.EditingControl as ColorPickerControl;

            _ColorPicker = ctl;

            if (this.Value != null && (this.Value.GetType() == typeof(Color)))
            {
                ctl.Color = (Color)this.Value;
            }
        }