Reputation: 300
I have a datagridview in Winform application. When I click on add button I want a blank row to be inserted at the bottom of datagridview.
I tried this one:
dataGridView1.Rows.Add(row);
But blank row is inserted at top not at the bottom. Is there any way to insert it at the bottom?
Upvotes: 3
Views: 8182
Reputation: 10824
you can use Insert
method:
dataGridView1.Rows.Insert(dataGridView1.Rows.Count-1, row);
Upvotes: 3