Dealy

Dealy

  • NA
  • 213
  • 0

How to save changes of a dataGridView

May 13 2015 2:13 AM
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)