I have a gridview that i bound to a dataset. In my footer I have an option for add new row. When they click on that i run the below code it will add a row the way i want it to. If i run the code again it will remove the row it just added and reset the way the page originally loaded.
i am thinking i have to do something with the gridview to accept the changes before i read the datasource again
Dim packages As New DataSet
packages = Me.GridView2.DataSource
Dim packagerow As DataRow
packagerow = packages.Tables(0).NewRow()
packagerow(0) = "Package " & packages.Tables(0).Rows.Count + 1
packagerow(1) = "1"
Me.GridView2.DataSource = packages
packages = Nothing