glynn1280
April 10th, 2008, 03:28 PM
When I delete a record from the datagridview it also updates the database. When I reload the form everything stays deleted. I used the following code...
Code Snippetprivate void borrowersBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
customerTableAdapter.Update(cm05501DataSet.Customer);
}
However, when I add a new record, save, exit and reload the form the new record is not there. The newly added record is infact saved to the acutal database, but for reasons unknown is not saved to the datagridview and does not show when the form is loaded. I used the following code in form_load and save...
Code Snippetprivate void Form1_Load(object sender, EventArgs e)
{
this.Validate();
this.customerBindingSource.EndEdit();
this.customerTableAdapter.Fill(this.cm05501DataSet.Customer);
}
Code Snippetprivate void borrowersBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
customerTableAdapter.Update(cm05501DataSet.Customer);
}
Code Snippetprivate void borrowersBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
customerTableAdapter.Update(cm05501DataSet.Customer);
}
However, when I add a new record, save, exit and reload the form the new record is not there. The newly added record is infact saved to the acutal database, but for reasons unknown is not saved to the datagridview and does not show when the form is loaded. I used the following code in form_load and save...
Code Snippetprivate void Form1_Load(object sender, EventArgs e)
{
this.Validate();
this.customerBindingSource.EndEdit();
this.customerTableAdapter.Fill(this.cm05501DataSet.Customer);
}
Code Snippetprivate void borrowersBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
customerTableAdapter.Update(cm05501DataSet.Customer);
}