mahesh waghela

mahesh waghela

  • NA
  • 93
  • 113.9k

TextBox Example Into Datagridview

Nov 23 2010 7:58 AM
I have simple textbox example as below:

 private void Form1_Load(object
sender, EventArgs e)

        {

            textBox1.Text = "Apple";

        }

private void textBox1_TextChanged(object sender, EventArgs e)

        {

            if (textBox1.Text.Length == 1)

            {

                if (textBox1.Text == "B" || textBox1.Text == "b")

                {

                    textBox1.Text = "Ball";

                }

            }

        }


By default textbox1 should return "Apple" on Form load but when I press "b" or "B" then it should return "Ball" on textbox1. I have a confusion on utilize it into datagridview. how can i do it in datagridview?.

Suppose I have One column on datagridview like below:

 private void Form1_Load(object
sender, EventArgs e)

        {

            DataGridViewColumn Particulars = new DataGridViewTextBoxColumn();

            dataGridView1.Columns.Insert(0, Particulars );

        }


If I have above column In datagridview1 than How to do I with datagridview1 which I have did with textbox?.



Answers (1)