c# - How to implement two way binding to collection that represents data from externally modifiable database? -


i have model bound view listview using viewmodel observablecollection.

the model implements inotifypropertychanged interface. if there change in of properties view getting updated.

but if new row gets added database view not getting updated. in case third party webservice writes data database. whenever data gets added/deleted want update ui.

how can achieve this?

viewmodel.cs

public observablecollection<employee> employeelist {get; set;} 

view:

listview.itemssource = viewmodel.employeelist 

you can write own class raises , event every time , object added , listen it.

also , following question has more details

how notification on change in observablecollection object


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -