Hello Angel Lee,
had the same problem as you - andI think I solved it:
I drag-and-dropped a table "Recordings" from an existing DataSet "musicDataSet" into my form and was happy to see my table as DataGridView "recordingsDataGridView".
This might apply tosimilar control elements, too - haven't tested it already.
After starting the application, iwas able toedit the values in this DataGridView - but unfortunately the values were not stored to the database.
I assumed that values are storedMS Access-like:
edit a value, change or leave the record and the value is stored in the database / table.
Wrong - You have to "tell" the DataGridView that it has to update the database / table when leaving the record, or to be more exactly: when editing the cell ends:
Open the Properties of your DataGridView, select "Events", doubleclickinto the empty field right to "CellEndEdit" - this is the event that will happen, when you leave the cell after editing it.
The Code-Window will pop-up, presenting you an empty function:
private void recordingsDataGridView_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
}
Enter the following lines into this function:
this.Validate();
// recordingsBindingSource = the name of my bindingSource
this.recordingsBindingSource.EndEdit();
//recordingsTableAdapter = the name of my tableAdapter
this.recordingsTableAdapter.Update(this.musicDataSet.Recordings);
Now your values will bestored to the database / table after you finished editing them.
Hope, I could solve your problem.