C# Programming
06-02-2009, 12:31 PM
hello every body,
i use a datagrid view bounded to a datasource, but i can't update the changes happens in it.
although, i've added the insert, update & delete queries i also use a dataset with a tableAdapter .
and this what iam doing in the onSaveButton_Click:
try
{
dataGridView1.EndEdit();
this.visitorTableAdapter.Update(this.omvDataSet.visitor);
omvDataSet.AcceptChanges();
MessageBox.Show("Changes saved successfully");
}
catch (Exception ex)
{ MessageBox.Show(ex.Message); }
so, what is the right solution to accomplish what i want.
Regards
i use a datagrid view bounded to a datasource, but i can't update the changes happens in it.
although, i've added the insert, update & delete queries i also use a dataset with a tableAdapter .
and this what iam doing in the onSaveButton_Click:
try
{
dataGridView1.EndEdit();
this.visitorTableAdapter.Update(this.omvDataSet.visitor);
omvDataSet.AcceptChanges();
MessageBox.Show("Changes saved successfully");
}
catch (Exception ex)
{ MessageBox.Show(ex.Message); }
so, what is the right solution to accomplish what i want.
Regards