I'm very new to Visual Basic. I have discovered that it is much easier
to design the form than it is to make it work with code. I'm a college
student. I'm trying to make an application that will help me keep track
of my assignments.
I have three textboxes. They are assignment name, class name, and due
date. I want to push the "Add Assignment" button and move all the text from the boxes
into three columns in a datagrid. I've figured out how to code the
datagrid to create a new row when the button is pushed, but I can not
find out how to put the text into the row that is created. What sort of
code would do this?
Loading
Ryan AlfordPosted Nov 19, 2008, 11:29 AM
now use the following code:
private void button1_Click(object sender, EventArgs e)
{
object[] array = new object[3];
array[0] = textBox1.Text;
array[1] = textBox2.Text;
array[2] = textBox3.Text;
dataGridView1.Rows.Add(array);
}