private void addDesignationsCol(string theDesignation) { DataColumn newCol = new DataColumn(); newCol.ColumnName = theDesignation; DataColumn newColDay = new DataColumn(); newColDay.ColumnName = theDesignation + " Day"; newColDay.DataType = typeof(Int32); DataColumn newColNight = new DataColumn(); newColNight.ColumnName = theDesignation + " Night"; newColNight.DataType = typeof(Int32); theMainData.Columns.Add(newCol); theMainData.Columns.Add(newColDay); theMainData.Columns.Add(newColNight); DevExpress.XtraVerticalGrid.Rows.CategoryRow group2 = new DevExpress.XtraVerticalGrid.Rows.CategoryRow(); DevExpress.XtraVerticalGrid.Rows.MultiEditorRow theDesig = new DevExpress.XtraVerticalGrid.Rows.MultiEditorRow(); DevExpress.XtraVerticalGrid.Rows.MultiEditorRowProperties theDesigDay = new DevExpress.XtraVerticalGrid.Rows.MultiEditorRowProperties(); DevExpress.XtraVerticalGrid.Rows.MultiEditorRowProperties theDesigNight = new DevExpress.XtraVerticalGrid.Rows.MultiEditorRowProperties(); theDesigDay.Caption = "Day Crew"; theDesigDay.FieldName = theDesignation + " Day"; theDesigNight.Caption = "Night Crew"; theDesigNight.FieldName = theDesignation + " Night"; theDesig.PropertiesCollection.Add(theDesigDay); theDesig.PropertiesCollection.Add(theDesigNight); group2.Properties.Caption = theDesignation; groupA.ChildRows.Add(group2); group2.ChildRows.Add(theDesig); // vgcOptions.Rows.Add(group2); }
private void buildStoping() { DevExpress.XtraVerticalGrid.Rows.CategoryRow group1 = new DevExpress.XtraVerticalGrid.Rows.CategoryRow(); DevExpress.XtraVerticalGrid.Rows.EditorRow theOption = new DevExpress.XtraVerticalGrid.Rows.EditorRow(); DevExpress.XtraVerticalGrid.Rows.EditorRow theStopeType = new DevExpress.XtraVerticalGrid.Rows.EditorRow(); DevExpress.XtraVerticalGrid.Rows.EditorRow theNightShift = new DevExpress.XtraVerticalGrid.Rows.EditorRow(); DevExpress.XtraVerticalGrid.Rows.CategoryRow panelLengthGroup = new DevExpress.XtraVerticalGrid.Rows.CategoryRow(); DevExpress.XtraVerticalGrid.Rows.MultiEditorRow thePanLength = new DevExpress.XtraVerticalGrid.Rows.MultiEditorRow(); DevExpress.XtraVerticalGrid.Rows.MultiEditorRowProperties thePanLengthMax = new DevExpress.XtraVerticalGrid.Rows.MultiEditorRowProperties(); DevExpress.XtraVerticalGrid.Rows.MultiEditorRowProperties thePanLengthMin = new DevExpress.XtraVerticalGrid.Rows.MultiEditorRowProperties(); DevExpress.XtraVerticalGrid.Rows.CategoryRow stopeWidthGroup = new DevExpress.XtraVerticalGrid.Rows.CategoryRow(); DevExpress.XtraVerticalGrid.Rows.MultiEditorRow theStopeWidth = new DevExpress.XtraVerticalGrid.Rows.MultiEditorRow(); DevExpress.XtraVerticalGrid.Rows.MultiEditorRowProperties theStopeWidthMax = new DevExpress.XtraVerticalGrid.Rows.MultiEditorRowProperties(); DevExpress.XtraVerticalGrid.Rows.MultiEditorRowProperties theStopeWidthMin = new DevExpress.XtraVerticalGrid.Rows.MultiEditorRowProperties(); DevExpress.XtraVerticalGrid.Rows.EditorRow theNumGully = new DevExpress.XtraVerticalGrid.Rows.EditorRow(); vgcOptions.Rows.Clear(); groupA.ChildRows.Clear(); group1.Properties.Caption = "Working place characteristic"; theOption.Properties.Caption = "Option"; theOption.Properties.FieldName = "theOption"; theOption.OptionsRow.AllowFocus = false; theStopeType.Properties.Caption = "Stoping type"; theStopeType.Properties.FieldName = "theType"; theStopeType.OptionsRow.AllowFocus = false; theNightShift.Properties.Caption = "Night shift?"; theNightShift.Properties.FieldName = "NightShift"; theNightShift.Properties.RowEdit = riNightShift; panelLengthGroup.Properties.Caption = "Panel length (m)"; thePanLengthMin.Caption = "Min"; thePanLengthMin.FieldName = "PanelLengthMin"; thePanLengthMax.Caption = "Max"; thePanLengthMax.FieldName = "PanelLengthMax"; thePanLength.PropertiesCollection.Add(thePanLengthMin); thePanLength.PropertiesCollection.Add(thePanLengthMax); stopeWidthGroup.Properties.Caption = "Stoping width"; theStopeWidthMin.Caption = "Min"; theStopeWidthMax.Caption = "Max"; theStopeWidthMax.FieldName = "SWMax"; theStopeWidthMin.FieldName = "SWMin"; theStopeWidth.PropertiesCollection.Add(theStopeWidthMin); theStopeWidth.PropertiesCollection.Add(theStopeWidthMax); theNumGully.Properties.Caption = "Number of winches in operation (excl. centre gulley)"; theNumGully.Properties.FieldName = "NumWinch"; // group1.Appearance.ParentAppearance.Font.Bold .Font .Bold = true; vgcOptions.Rows.Add(group1); // vgcOptions.Rows.Add(theOption); group1.ChildRows.Add(theOption); group1.ChildRows.Add(theStopeType); group1.ChildRows.Add(theNightShift); group1.ChildRows.Add(panelLengthGroup); group1.ChildRows.Add(stopeWidthGroup); panelLengthGroup.ChildRows.Add(thePanLength); stopeWidthGroup.ChildRows.Add(theStopeWidth); group1.ChildRows.Add(theNumGully); groupA.Properties.Caption = "Designation (crew composition)"; vgcOptions.Rows.Add(groupA); }