Reputation: 894
I have a application which has a parent window with some menus on it ,when the menu clicks corresponding usercontrol is loaded inside the parent window as child.The parent window supports many usercontrols on each menu click ,the usercontrols are docked into the parent window. I have a usercontrol namely Items master from which the user can add items and save into database, I have another usercontrol which has a datagrid with a Combobox column for selectiong Items .The both user controls are docked on the parent window .When I add an Item into the Item master but that product is not available on the datagrid .How to refresh the items source of the datagrid combobox column when a new product is added ?
Upvotes: 0
Views: 92
Reputation: 676
The quick answer is: use something like an event-aggregator to pass messages around the system when data is altered, so that each individual screen can re-load their respective data. The more important part is in designing and structuring you application to allow views to access the common data effectively. Look into something like MVVM for UI design.
Upvotes: 1