I have a MVVM dialog which lists the users from the DB. There is an add button on click, it opens a modal (which is in MVC). On addition of a user, the modal closes. But the user added is not populated in the parent dialog which called the add user modal. Is there any way to populate the MVVM on data change without needing to call another method or refresh the page?
Refresh data in MVVM page after modal close (written in MVC)
1.7k Views Asked by Karthik At
2
You could use a
Global-Command
.just before you close the modal window :
and in your ViewModel of the user list :
Note : I'm assuming you have a method
getUsers
. otherwise renameusers
to the correct getter of your users.