/// <summary> /// todoComment /// </summary> /// <param name="AGrid"></param> /// <param name="ASourceTable"></param> public void CreateColumns(TSgrdDataGrid AGrid, PFoundationDeadlineTable ASourceTable) { SourceGrid.Cells.Editors.ComboBox FMonthEditor; SourceGrid.Cells.Editors.TextBoxNumeric FDayEditor; Int32[] MonthDropDownValues; String[] MonthDropDownDisplayValues; DevAge.ComponentModel.Validator.ValueMapping MonthDropDownMapping; // Set up Month ComboBox editor MonthDropDownValues = new Int32[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; MonthDropDownDisplayValues = new String[] { "JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER" }; FMonthEditor = new SourceGrid.Cells.Editors.ComboBox(typeof(Int32), MonthDropDownValues, true); FMonthEditor.Control.FormattingEnabled = true; MonthDropDownMapping = new DevAge.ComponentModel.Validator.ValueMapping(); MonthDropDownMapping.SpecialType = typeof(String); MonthDropDownMapping.SpecialList = MonthDropDownDisplayValues; MonthDropDownMapping.ValueList = MonthDropDownValues; MonthDropDownMapping.BindValidator(FMonthEditor); FMonthEditor.EditableMode = EditableMode.Focus; FDayEditor = new SourceGrid.Cells.Editors.TextBoxNumeric(typeof(Int32)); FDayEditor.EditableMode = EditableMode.Focus; AGrid.AddTextColumn("Month", ASourceTable.ColumnDeadlineMonth, 80, FMonthEditor); AGrid.AddTextColumn("Day", ASourceTable.ColumnDeadlineDay, -1, FDayEditor); // Hook up editor events FDayEditor.Control.Validating += new System.ComponentModel.CancelEventHandler(Day_Validating); FMonthEditor.Control.Validating += new System.ComponentModel.CancelEventHandler(Month_Validating); }
/// <summary> /// todoComment /// </summary> /// <param name="AGrid"></param> /// <param name="ASourceTable"></param> public void CreateColumns(TSgrdDataGrid AGrid, PFoundationDeadlineTable ASourceTable) { SourceGrid.Cells.Editors.ComboBox FMonthEditor; SourceGrid.Cells.Editors.TextBoxNumeric FDayEditor; Int32[] MonthDropDownValues; String[] MonthDropDownDisplayValues; DevAge.ComponentModel.Validator.ValueMapping MonthDropDownMapping; // Set up Month ComboBox editor MonthDropDownValues = new Int32[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; MonthDropDownDisplayValues = new String[] { "JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER" }; FMonthEditor = new SourceGrid.Cells.Editors.ComboBox(typeof(Int32), MonthDropDownValues, true); FMonthEditor.Control.FormattingEnabled = true; MonthDropDownMapping = new DevAge.ComponentModel.Validator.ValueMapping(); MonthDropDownMapping.SpecialType = typeof(String); MonthDropDownMapping.SpecialList = MonthDropDownDisplayValues; MonthDropDownMapping.ValueList = MonthDropDownValues; MonthDropDownMapping.BindValidator(FMonthEditor); FMonthEditor.EditableMode = EditableMode.Focus; FDayEditor = new SourceGrid.Cells.Editors.TextBoxNumeric(typeof(Int32)); FDayEditor.EditableMode = EditableMode.Focus; AGrid.AddTextColumn("Month", ASourceTable.ColumnDeadlineMonth, 80, FMonthEditor); AGrid.AddTextColumn("Day", ASourceTable.ColumnDeadlineDay, -1, FDayEditor); // Hook up editor events FDayEditor.Control.Validating += new System.ComponentModel.CancelEventHandler(Day_Validating); FMonthEditor.Control.Validating += new System.ComponentModel.CancelEventHandler(Month_Validating); }