>// for each table: >this.BindingContext[MyDataTable}.EndCurrentEdit(); >>or
>for (int i=0; i < MyDataSet.Tables.Count; i++) >{ > for (int j=0; j < MyDataSet.Tables[i].Rows.Count; j++) > { > if (MyDataSet.Tables[i].Rows[j].HasVersion(DataRowVersion.Proposed)) > MyDataSet.Tables[i].Rows[j].EndEdit(); > } >} >>I've had problems occasionally with the simpler method above (and it may just be something I didn't understand in the earlier days), and so I do the other one instead.
>MyDataSet.AcceptChanges(); >>