Hello all,
I want to update the database thru datagrid n also delete the contents of the selected row from the datagrid n then the database should be updated. however am getting a repeated error as to Unable to find Table[0] or Update unable to find TableMapping or DataTable 'Table'. error ....Below is the code snippet for ur reference....plz help me out on this ..this code is only for the delete event...however at the time of updating the database am getting error..plz help me solve this...
private void btnupdate_Click(object sender, EventArgs e)
{
foreach(DataGridViewRow row in dg1.SelectedRows)
{
if (row.Index != dg1.Rows.Count - 1)
{
dg1.Rows.RemoveAt(row.Index);
}
}
da.Update(ds) ;
}