Hi,
I am adding a blank row to gridview in asp.net at button click.. This row i am adding to a datatable. Is it possible to add the whole row to table at one go.If yes, how to do that?
Adding gridview row to sql table
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Amit ChoudharyRank #145 · 15.8K reputationPosted Oct 3, 2011, 10:11 PM EDT
DataTable myTable= GridView1.DataSource;
try this I hope this would add all the newly added rows in one go.
Else you have to create individual row from GridViews rows and then add one by one to Datatable.
B M SuchitraRank #2,922 · 492 reputationPosted Oct 4, 2011, 12:54 AM EDT
As i have told in the post, i am adding blank rows to gridview at button click event.. The data entered in the rows need to be added to database..