public override object Clone() { DataGridViewNumericTextBoxColumn column = (DataGridViewNumericTextBoxColumn)base.Clone(); column.EmptyValue = this.EmptyValue; column.DecimalPlaces = this.DecimalPlaces; column.Maximum = this.Maximum; column.Minimum = this.Minimum; return(column); }
/// <inheritdoc /> protected override DataGridViewColumn CreateColumn(PropertyInfo property) { DataGridViewColumn column = null; if (property.PropertyType.IsBoolean()) { column = new DataGridViewCheckBoxColumn(); } else if (property.PropertyType.IsString()) { column = new DataGridViewTextBoxColumn(); } else if (property.PropertyType.IsNumber()) { column = new DataGridViewNumericTextBoxColumn(); } else if (property.PropertyType.IsDateTime()) { column = new DataGridViewCalendarColumn(); } else if (property.PropertyType.IsEnum) { column = new DataGridViewComboBoxColumn(); typeof(DropdownUtility).GetMethod( ((MethodCallExpression)(((Expression <Action>)(() => DropdownUtility.Fill <BindingFlags>((ListControl)null, false))).Body)).Method.Name, new Type[] { typeof(DataGridViewComboBoxColumn), typeof(bool) }).MakeGenericMethod(property.PropertyType).Invoke(null, new object[] { column, false }); } else if (property.PropertyType.IsInherits <Image>()) { column = new DataGridViewImageColumn { ValuesAreIcons = false, }; } else if (property.PropertyType.IsInherits <Icon>()) { column = new DataGridViewImageColumn { ValuesAreIcons = true, }; } else { column = new DataGridViewTextBoxColumn(); } return(column); }