BindingNavigatorの自動生成された保存ボタンを以下のように追加変更します。
private void customersBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
this.Validate();
this.customersBindingSource.EndEdit();
this.customersTableAdapter.Update(this.northwindDataSet.Customers);
}
上記を下記のようにします。
private void customersBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
this.Validate();
this.customersBindingSource.EndEdit();
this.customersTableAdapter.Update(this.northwindDataSet.Customers);
this.ordersBindingSource.EndEdit();
this.ordersTableAdapter.Update(this.northwindDataSet.Orders);
}
ここで、
親)
customersBindingSource
customersTableAdapter
子)
ordersBindingSource
ordersTableAdapter
となっています。
なるほど、それだけで良かったんですね。