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

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

qt - Change color of QGraphicsView rubber band -

c++ - Visible files in the "Projects" View of the Qt Creator IDE if using the CMake build system -