2
Answers

DatagridView save Change to database

Paul Loughridge

Paul Loughridge

16y
15.8k
1

  I have a datagridview control and want to save changes made in the grid to the database.
   This ia my code which doesn't work. Your thoughts.
   private void customersBindingNavigatorSaveItem_Click(object sender, EventArgs e)
        {
            string Msg = "Requested changes have been made to the database.";
            lblInstructions.Text = Msg ;
          
            this.Validate();
            this.customersBindingSource.EndEdit();
            this.customersTableAdapter.Update(this.northwindDataSet.Customers);

        }

 

Answers (2)