Brennan
Brennan

Reputation: 17

Adding rows to a DataGridView with data from text Boxes

Here's what the form looks like so far

http://i.imgur.com/EoTIZ98.png

My data grid view is called FilesGrid, but the textboxes are the same like textBox1... in order as you see them from top to bottom.

PS: I'm a Noob at C#

Upvotes: 0

Views: 112

Answers (1)

Syed Wajahat Ali
Syed Wajahat Ali

Reputation: 563

You can use DataGridView.Rows.Add() method like this

FilesGrid.Rows.Add(textBox1.Text, textBox2.Text, textBox3.Text,textBox4.Text);

For further details visit this page

Upvotes: 1

Related Questions