Click here to Skip to main content
15,907,281 members
Home / Discussions / C#
   

C#

 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute21-May-09 7:01
Henry Minute21-May-09 7:01 
GeneralRe: Multiple forms and datagridviews Pin
bwood202021-May-09 8:48
bwood202021-May-09 8:48 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute21-May-09 9:08
Henry Minute21-May-09 9:08 
GeneralRe: Multiple forms and datagridviews Pin
bwood202021-May-09 9:54
bwood202021-May-09 9:54 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute21-May-09 10:42
Henry Minute21-May-09 10:42 
GeneralRe: Multiple forms and datagridviews Pin
bwood202021-May-09 13:01
bwood202021-May-09 13:01 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute22-May-09 9:59
Henry Minute22-May-09 9:59 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute22-May-09 10:05
Henry Minute22-May-09 10:05 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute22-May-09 10:08
Henry Minute22-May-09 10:08 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute22-May-09 10:12
Henry Minute22-May-09 10:12 
GeneralRe: Multiple forms and datagridviews Pin
bwood202022-May-09 10:19
bwood202022-May-09 10:19 
GeneralRe: Multiple forms and datagridviews Pin
bwood202026-May-09 4:08
bwood202026-May-09 4:08 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute26-May-09 4:15
Henry Minute26-May-09 4:15 
GeneralRe: Multiple forms and datagridviews Pin
bwood202026-May-09 6:13
bwood202026-May-09 6:13 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute26-May-09 6:20
Henry Minute26-May-09 6:20 
GeneralRe: Multiple forms and datagridviews Pin
bwood202026-May-09 12:47
bwood202026-May-09 12:47 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute26-May-09 13:11
Henry Minute26-May-09 13:11 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute26-May-09 13:18
Henry Minute26-May-09 13:18 
GeneralRe: Multiple forms and datagridviews [modified] Pin
bwood202027-May-09 5:44
bwood202027-May-09 5:44 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute27-May-09 7:20
Henry Minute27-May-09 7:20 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute27-May-09 10:41
Henry Minute27-May-09 10:41 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute27-May-09 11:39
Henry Minute27-May-09 11:39 
GeneralRe: Multiple forms and datagridviews Pin
bwood202027-May-09 12:18
bwood202027-May-09 12:18 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute27-May-09 12:29
Henry Minute27-May-09 12:29 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute27-May-09 12:35
Henry Minute27-May-09 12:35 
Er..................
I did tell you that I had added two dgv columns, in the designer, didn't I?

No, you say!

ahem:
private void InitializeComponent()
{
    this.components = new System.ComponentModel.Container();
    this.dataGridView1 = new System.Windows.Forms.DataGridView();
    this.btnGetValue = new System.Windows.Forms.Button();
    this.clientColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
    this.standardColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
    this.headersBindingSource = new System.Windows.Forms.BindingSource(this.components);
    ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
    ((System.ComponentModel.ISupportInitialize)(this.headersBindingSource)).BeginInit();
    this.SuspendLayout();
    //
    // dataGridView1
    //
    this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
    this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
    this.clientColumn,
    this.standardColumn});
    this.dataGridView1.Location = new System.Drawing.Point(12, 12);
    this.dataGridView1.Name = "dataGridView1";
    this.dataGridView1.Size = new System.Drawing.Size(284, 171);
    this.dataGridView1.TabIndex = 0;
    //
    // btnGetValue
    //
    this.btnGetValue.Location = new System.Drawing.Point(154, 236);
    this.btnGetValue.Name = "btnGetValue";
    this.btnGetValue.Size = new System.Drawing.Size(75, 23);
    this.btnGetValue.TabIndex = 1;
    this.btnGetValue.Text = "Value";
    this.btnGetValue.UseVisualStyleBackColor = true;
    this.btnGetValue.Click += new System.EventHandler(this.btnGetValue_Click);
    //
    // clientColumn
    //
    this.clientColumn.HeaderText = "Client Header";
    this.clientColumn.Name = "clientColumn";
    //
    // standardColumn
    //
    this.standardColumn.HeaderText = "Standard Header";
    this.standardColumn.Name = "standardColumn";
    //
    // ListEditorForm
    //
    this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);
    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    this.ClientSize = new System.Drawing.Size(422, 288);
    this.Controls.Add(this.btnGetValue);
    this.Controls.Add(this.dataGridView1);
    this.Name = "ListEditorForm";
    this.Text = "List Editor";
    this.Load += new System.EventHandler(this.ListEditorForm_Load);
    ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
    ((System.ComponentModel.ISupportInitialize)(this.headersBindingSource)).EndInit();
    this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Button btnGetValue;
private System.Windows.Forms.BindingSource headersBindingSource;
private System.Windows.Forms.DataGridViewTextBoxColumn clientColumn;
private System.Windows.Forms.DataGridViewComboBoxColumn standardColumn;


Here is the designer code for the first form. Just replace the code in your form1.designer.cs file with it.

I think I'll go for a lie down in a dark room now.

Henry Minute

Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.