I have "binded" my Access database to the Datagridview in my form. I have added an event for double mouse click in datagridview row header.
private void dataGridView1_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
{
foreach (DataGridViewRow item in this.dataGridView1.SelectedRows)
dataGridView1.Rows.RemoveAt(item.Index);
this.Validate();
this.firearmBindingSource.EndEdit();
this.firearmTableAdapter.Update(this.firearmsDataSet.Firearm);
}
This code works(removes both view and source) on the first attempt upon the form loading at the start debugging. Any additional "double clicks" will remove row from the datagridview but not the source.
Where am I going wrong?
Thanks again.