protected void SetEmpiricalRowHeadsers(NftDataGridView empiricalDataGrid) { for (int i = 0; i < empiricalDataGrid.Rows.Count; i++) { empiricalDataGrid.Rows[i].HeaderCell.Value = (i + 1).ToString(); } }
private void SetRecruitPredictorRowHeaders(NftDataGridView predictorDataGrid) { for (int i = 0; i < predictorDataGrid.Rows.Count; i++) { predictorDataGrid.Rows[i].HeaderCell.Value = (i + 1).ToString(); } }
public ControlRecruitmentEmpiricalTwoStage() { InitializeComponent(); //Programmically Add Controls labelLv1NumObservations = new Label(); spinBoxLv1NumObservations = new NumericUpDown(); labelLv2NumObservations = new Label(); spinBoxLv2NumObservations = new NumericUpDown(); labelSSBBreakValue = new Label(); textBoxSSBBreakValue = new TextBox(); labelLv1ObservationTable = new Label(); labelLv2ObservationTable = new Label(); dataGridLv1ObservationTable = new NftDataGridView(); dataGridLv2ObservationTable = new NftDataGridView(); //this.groupEmpiricalParameters.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(spinBoxLv1NumObservations)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(spinBoxLv2NumObservations)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(dataGridLv1ObservationTable)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(dataGridLv2ObservationTable)).BeginInit(); SuspendLayout(); labelNumObservations.Visible = false; spinBoxNumObservations.Visible = false; dataGridRecruitTable.Visible = false; labelObservations.Visible = false; // // labelLv1NumObservations // labelLv1NumObservations.AutoSize = true; labelLv1NumObservations.Location = new System.Drawing.Point(18, 16); labelLv1NumObservations.Name = "labelLv1NumObservations"; labelLv1NumObservations.Size = new System.Drawing.Size(123, 13); labelLv1NumObservations.TabIndex = 0; labelLv1NumObservations.Text = "Level 1 Number Of Observations"; // // spinBoxLv1NumObservations // spinBoxLv1NumObservations.Location = new System.Drawing.Point(225, 14); spinBoxLv1NumObservations.Name = "spinBoxLv1NumObservations"; spinBoxLv1NumObservations.Size = new System.Drawing.Size(120, 20); spinBoxLv1NumObservations.TabIndex = 1; spinBoxLv1NumObservations.Value = 0; // // labelLv2NumObservations // labelLv2NumObservations.AutoSize = true; labelLv2NumObservations.Location = new System.Drawing.Point(18, 43); labelLv2NumObservations.Name = "labelLv2NumObservations"; labelLv2NumObservations.Size = new System.Drawing.Size(123, 13); labelLv2NumObservations.TabIndex = 2; labelLv2NumObservations.Text = "Level 2 Number Of Observations"; // // spinBoxLv2NumObservations // spinBoxLv2NumObservations.Location = new System.Drawing.Point(225, 40); spinBoxLv2NumObservations.Name = "spinBoxLv1NumObservations"; spinBoxLv2NumObservations.Size = new System.Drawing.Size(120, 20); spinBoxLv2NumObservations.TabIndex = 3; spinBoxLv2NumObservations.Value = 0; // // labelSSBBreakValue // labelSSBBreakValue.AutoSize = true; labelSSBBreakValue.Location = new System.Drawing.Point(18, 69); labelSSBBreakValue.Name = "labelSSBBreakValue"; labelSSBBreakValue.Size = new System.Drawing.Size(89, 13); labelSSBBreakValue.TabIndex = 5; labelSSBBreakValue.Text = "SSB Break Value (MT)"; // // textBoxSSBBreakValue // textBoxSSBBreakValue.Location = new System.Drawing.Point(225, 66); textBoxSSBBreakValue.Name = "textBoxSSBBreakValue"; textBoxSSBBreakValue.Size = new System.Drawing.Size(120, 20); textBoxSSBBreakValue.TabIndex = 6; // // labelLv1ObservationTable // labelLv1ObservationTable.AutoSize = true; labelLv1ObservationTable.Location = new System.Drawing.Point(-3, 101); labelLv1ObservationTable.Name = "labelLv1Observations"; labelLv1ObservationTable.Size = new System.Drawing.Size(69, 13); labelLv1ObservationTable.TabIndex = 8; labelLv1ObservationTable.Text = "Level 1 Observations"; // // dataGridLv1ObservationTable // dataGridLv1ObservationTable.AllowUserToAddRows = false; dataGridLv1ObservationTable.AllowUserToDeleteRows = false; dataGridLv1ObservationTable.Anchor = ((AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left)))); dataGridLv1ObservationTable.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; dataGridLv1ObservationTable.Location = new System.Drawing.Point(0, 117); dataGridLv1ObservationTable.Name = "dataGridLv1Observations"; dataGridLv1ObservationTable.Size = new System.Drawing.Size(328, 223); dataGridLv1ObservationTable.TabIndex = 8; dataGridLv1ObservationTable.RowHeadersWidth = 70; dataGridLv1ObservationTable.CellFormatting -= new DataGridViewCellFormattingEventHandler(dataGridLv1ObservationTable_CellFormatting); dataGridLv1ObservationTable.CellFormatting += new DataGridViewCellFormattingEventHandler(dataGridLv1ObservationTable_CellFormatting); // // labelLv2ObservationTable // labelLv2ObservationTable.AutoSize = true; labelLv2ObservationTable.Location = new System.Drawing.Point(447, 101); labelLv2ObservationTable.Name = "labelLv2Observations"; labelLv2ObservationTable.Size = new System.Drawing.Size(69, 13); labelLv2ObservationTable.TabIndex = 9; labelLv2ObservationTable.Text = "Level 2 Observations"; // // dataGridLv2ObservationTable // dataGridLv2ObservationTable.AllowUserToAddRows = false; dataGridLv2ObservationTable.AllowUserToDeleteRows = false; dataGridLv2ObservationTable.Anchor = ((AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left)))); dataGridLv2ObservationTable.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; dataGridLv2ObservationTable.Location = new System.Drawing.Point(450, 117); dataGridLv2ObservationTable.Name = "dataGridLv1Observations"; dataGridLv2ObservationTable.Size = new System.Drawing.Size(328, 223); dataGridLv2ObservationTable.TabIndex = 9; dataGridLv2ObservationTable.RowHeadersWidth = 70; dataGridLv2ObservationTable.CellFormatting -= new DataGridViewCellFormattingEventHandler(dataGridLv2ObservationTable_CellFormatting); dataGridLv2ObservationTable.CellFormatting += new DataGridViewCellFormattingEventHandler(dataGridLv2ObservationTable_CellFormatting); buttonSetParameters.TabIndex = 7; groupEmpiricalParameters.Controls.Add(labelLv1NumObservations); groupEmpiricalParameters.Controls.Add(spinBoxLv1NumObservations); groupEmpiricalParameters.Controls.Add(labelLv2NumObservations); groupEmpiricalParameters.Controls.Add(spinBoxLv2NumObservations); groupEmpiricalParameters.Controls.Add(labelSSBBreakValue); groupEmpiricalParameters.Controls.Add(textBoxSSBBreakValue); groupEmpiricalParameters.Size = new System.Drawing.Size(574, 94); Controls.Add(labelLv1ObservationTable); Controls.Add(dataGridLv1ObservationTable); Controls.Add(labelLv2ObservationTable); Controls.Add(dataGridLv2ObservationTable); ((System.ComponentModel.ISupportInitialize)(spinBoxLv1NumObservations)).EndInit(); ((System.ComponentModel.ISupportInitialize)(spinBoxLv2NumObservations)).EndInit(); ((System.ComponentModel.ISupportInitialize)(dataGridLv1ObservationTable)).EndInit(); ((System.ComponentModel.ISupportInitialize)(dataGridLv2ObservationTable)).EndInit(); ResumeLayout(false); PerformLayout(); }