3
Answers

How to save changes of a dataGridView

Dealy

Dealy

9y
389
1
Hello,

I'm using the following code to load data on a gridView and bind them to a bindNavigator. 

da = new SqlDataAdapter("SELECT * FROM Users", connectionstring);

ds = new DataSet();
da.Fill(ds);
bs = new BindingSource();
bs.DataSource = ds.Tables[0].DefaultView;
userBindNav.BindingSource = bs;
userGridView.DataSource = bs;

How can I save changes to database after editing data (insert, update, delete)?


Thank you in advance.
Answers (3)