I have a (non MVVM) wpf system that displays various Db's (BankAccount, Customers etc) in separate viewer windows that use a Datagrid to access the data.
My problem is that some of these tables contain data that needs to be updated in more than one of the backing SQL tables. I know it shouldn't technically, but there are good reasons for this in this particular app.
For example, 2 of the tables contain a reference to the same Bank Account #, (which are used as keys), but there are cases where the user can want/need to change these particular values.
I am using ObervableCollections for the data read in from the tables, and these handle the updating in real time for the relevant "Main" table just fine, but I also need to update the same field in the other table.
Both tables are already loaded into their respective ObservableCollections. So I need a methodology to make the OnProertyChanged method update the secondary collection as well ?
I have tried various methods suggested across the Web, but cannot find a way to get this to occur automatically.
Can anyone help me out.
What I have tried:
My DataGrid columns are declared as shown here :
DataGridTextColumn Header="Bank #" Width="80"
SortMemberPath="BankNo"
Binding ="{Binding BankNo,
Mode=TwoWay,
UpdateSourceTrigger=LostFocus}"