Click here to Skip to main content
15,900,511 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have this in form load to creat column in c#
like this
C#
dataGridView1.Columns.Add("", "name");
            dataGridView1.Columns.Add("", "Address");
            dataGridView1.Columns.Add("", "gender");


now if i write value in the rows

i want to insert this rows to database what the code will be in the save button
Posted
Updated 5-Feb-12 23:03pm
v2

 
Share this answer
 
v2
Comments
Aniket Yadav 6-Feb-12 5:11am    
datagridview1.Update();
Check similar question and the solution.

How to insert data in GridView and then into database[^]
 
Share this answer
 
You can use Update method of TableAdapter
see this
DataBase Updation With DataGridView
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900