Click here to Skip to main content
15,896,111 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI,
In my view I have a DataGrid and a usercontrol, both are using two different ViewModels. My user control also contains a DataGrid. When I add a new row to my DataGrid in any one of the ViewModel, it should notify the other ViewModel or better pass the newly added DataRow to the other ViewModel. How can I achieve this.

Thanks & Regards,
Ramana
Posted
Comments
Sergey Alexandrovich Kryukov 7-Oct-13 11:55am    
One of the basics of the pattern is that ViewModels should not communicate directly...
—SA

1 solution

You could use Marlon's Mediator[^] or EventAggregator[^] from Microsoft's PRISM Framework. If you Google for Mediator/EventAggregator you get loads of samples on how to use them.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900