예제 #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;
            }
        }
예제 #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;
            }
        }