I'm having trouble using databinding in a situation where the parent table, and it's 0-many detail table is displayed on the same form.
The two tables are: CashReceipts and CashReceiptItems
The form is controlled by a BindingNavigator on CashReceipt, and the CashReceiptItems are managed by a DataGridView. What's displayed in the datagridview is filtered by a bindingsource, that way only the rows linked to the CashReceipt is shown.
This is the problem: it ain't workin'. When a user adds a row to CashReceipts, the ID is set to a temporary value {-1, -2, -3,...}, and when they add items to the Receipt the FK is linked to these temporary values. This works, until it's saved to the database, then everything goes crazy. The Receipts' get their ID updated, but the linked rows in the CashReceiptItems don't.
I've read something about a CurrencyManager or a BindingSourceManager, but I don't know what they are or how to use them. I've trying setting the constrant in the Strongly Typed Dataset to Cascade, but it complains on the Items table that the parent row is missing from the table when it's held by the other binding source.
How can I get the linked items to update automagically?