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
Comments
Post a Comment