0

Hi there,

I think im trying to do something pretty simple but i can't find a simple explanation.

What i have:
I have five Textboxs (1 to 5)
I have a Button
I have a Datagrid with five columns (1 to 5)

What i want to do:
on a button click
put whatevers in the 5 textboxs in the specified columns
create another row below
and so on..

I don't know why its not a easy as:

DataGridView1.CurrentRow.Cells("Column1").Value = TextBox1

Etc, then create another row and repeat.

I'm pretty new to VB so any help would be greatly appriciated.

Cheers

Alex

2
Contributors
2
Replies
13
Views
6 Years
Discussion Span
Last Post by Alexkid
0

See if this helps.

DataGridView1.Rows.Add(TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text, TextBox5.Text)
0

Thank you Codeorder, you're a legend! i new it had to be something along those lines.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.