Beispiel #1
0
        public override object Clone()
        {
            CalendarTextBoxDataGridViewColumn column = (CalendarTextBoxDataGridViewColumn)base.Clone();

            // column.AddElements(SL);
            // column.DescriptionColumn = DescriptionColumn;
            return(column);
        }
Beispiel #2
0
        public override void InitializeEditingControl(int rowIndex, object
                                                      initialFormattedValue, DataGridViewCellStyle dataGridViewCellStyle)
        {
            CalendarTextBoxDataGridViewControl ctl =
                DataGridView.EditingControl as CalendarTextBoxDataGridViewControl;

            //ctl.Text = (this.Value is System.DBNull) ? string.Empty : (string)this.Value;
            ctl.Text = (initialFormattedValue is System.DBNull) ? string.Empty : (string)initialFormattedValue;
            DataGridViewColumn dgvc = this.OwningColumn;

            if (dgvc is CalendarTextBoxDataGridViewColumn)
            {
                CalendarTextBoxDataGridViewColumn rtvc = dgvc as CalendarTextBoxDataGridViewColumn;

                // ctl.AddElements(rtvc.SL);
                // ctl.DescriptionColumn = rtvc.DescriptionColumn;
            }

            // Set the value of the editing control to the current cell value.
            base.InitializeEditingControl(rowIndex, initialFormattedValue,
                                          dataGridViewCellStyle);
        }