Link to home
Start Free TrialLog in
Avatar of chokka
chokkaFlag for United States of America

asked on

Adding New Rows from Empty Template -> DataGridView


In VB.Net / VS 2005 - Windows App.

Adding New Rows from Empty Template -> DataGridView

Using Insert Template Option
Avatar of John (Yiannis) Toutountzoglou
John (Yiannis) Toutountzoglou
Flag of Greece image

hi..
you can use subroutine Add
like
Dim n As Integer = DataGridView1.Rows.Add()
        DataGridView1.Rows.Item(n).Cells(0).Value = "something"
        DataGridView1.Rows.Item(n).Cells(1).Value = "something else"
    End Sub

If your datagridview is databound then we are talking aboutadd rows to a datatable
ASKER CERTIFIED SOLUTION
Avatar of John (Yiannis) Toutountzoglou
John (Yiannis) Toutountzoglou
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chokka

ASKER

Its a complicated DataGridView..

It has 5 Columns ..!

In the 5th Column we need to have a ComboBox which is already populated from Database.


Column1,Column2,Column3,Column4 have to entered from the application

you have already the datagridview and you want to pass values in a row ?