private void InitializeStandardTypes() { Register(typeof(bool), typeof(BooleanCellEditor)); Register(typeof(short), typeof(IntUpDown)); Register(typeof(int), typeof(IntUpDown)); Register(typeof(long), typeof(IntUpDown)); Register(typeof(ushort), typeof(UintUpDown)); Register(typeof(uint), typeof(UintUpDown)); Register(typeof(ulong), typeof(UintUpDown)); Register(typeof(float), typeof(FloatCellEditor)); Register(typeof(double), typeof(FloatCellEditor)); Register(typeof(DateTime), delegate(object model, OLVColumn column, object value) { var c = new DateTimePicker(); c.Format = DateTimePickerFormat.Short; return(c); }); Register(typeof(bool), delegate(object model, OLVColumn column, object value) { CheckBox c = new BooleanCellEditor2(); c.ThreeState = column.TriStateCheckBoxes; return(c); }); }
private void InitializeStandardTypes() { this.Register(typeof(Boolean), typeof(BooleanCellEditor)); this.Register(typeof(Int16), typeof(IntUpDown)); this.Register(typeof(Int32), typeof(IntUpDown)); this.Register(typeof(Int64), typeof(IntUpDown)); this.Register(typeof(UInt16), typeof(UintUpDown)); this.Register(typeof(UInt32), typeof(UintUpDown)); this.Register(typeof(UInt64), typeof(UintUpDown)); this.Register(typeof(Single), typeof(FloatCellEditor)); this.Register(typeof(Double), typeof(FloatCellEditor)); this.Register(typeof(DateTime), delegate(Object model, OLVColumn column, Object value) { DateTimePicker c = new DateTimePicker(); c.Format = DateTimePickerFormat.Short; return(c); }); this.Register(typeof(Boolean), delegate(Object model, OLVColumn column, Object value) { CheckBox c = new BooleanCellEditor2(); c.ThreeState = column.TriStateCheckBoxes; return(c); }); }