inotifypropertychanged


Cannot get data updates on NotifyPropertyChanged collection


I'm building a Mango app that writes data to a SqlCe database; I have a ListBox bound to a DataSource that must show items when they are added to the database, but when I add/update data I cannot get updates and they are only shown when I reload the page.
Here are some snippets:
public class TimeTrackerViewModel: INotifyPropertyChanged, INotifyPropertyChanging
{
private List<TimeItems> _timeItems;
public List<TimeItems> TimeItems
{
get { return _timeItems; }
set
{
NotifyPropertyChanging("TimeItems");
_timeItems = value;
NotifyPropertyChanged("TimeItems");
}
}
public void LoadCollectionsFromDatabase()
{
// Specify the query for all to-do items in the database.
var times = from t in db.Times
select new TimeItems
{
DtIn = t.DtIn,
DtOut = t.DtOut,
Id = t.Id
};
// Query the database and load all to-do items.
TimeItems = new List<TimeItems>(times);
}
.....
.....
}
When I add data to the Times table I don't see db updates to the listBox bound to the TimeItems collection.
What am I doing wrong?
Make TimeItems an ObservableCollection

Related Links

How to implement IReactiveNotifyPropertyChanged on a base class that alreay implements INotifyPropertyChanged
NotifyPropertyChanged Doesn't work, why?
PropertyChanged is always null
Using PostSharp NotifyPropertyChanged, how can you hook into the OnPropertyChanged event
Adapt existing POCO instance to implement INotifyPropertyChanged
Something other than INotifyPropertyChanged?
Cannot get data updates on NotifyPropertyChanged collection
INotifyPropertyChanged best practices
Caliburn.micro propertychanged problem in a view
Where is implementation of PropertyChanged EventHandler?
PropertyChanged Event, raise when OnClick?
Intended ObservableCollection +NotifyPropertyChanged

Categories

HOME
mql4
scipy
cpu-architecture
agile
travis-ci
bibtex
schemacrawler
shader
google-plus
powershell-v3.0
ssr
data-synchronization
ssms-2016
aptana
ng-show
clover
tweets
tortoisegit
nsmenuitem
cocoa-touch
restfb
bcrypt
hanami
excel-2013
vertex-buffer
configure
websauna
jboss5.x
pycparser
transient
rhino
phpspreadsheet
large-data
precedence
hashcat
pmwiki
vmd
bayesian-networks
react-native-router-flux
dojox.mobile
crop
pytest-django
finite-element-analysis
jdbi
floor
proof
walmart-electrode
nstouchbar
uiviewpropertyanimator
azureportal
uicollectionviewlayout
lotus
restivejs
c64
vst
activeweb
freetype2
nssplitview
distribute
magento-1.4
abas
connection-reset
xjc
git-checkout
mdm-zinc
code-first-migrations
alphablending
vcl
eclipse-classpath
korma
cppdepend
delphi-xe3
dbsetup
edit-in-place
bsod
wic
document-database
bignum
cilk-plus
.net-cf-3.5
vertical-rhythm
ruboto
vmware-server
apache2.2
iconv
mailcore
objcmongodb
dropdownlistfor
linkedhashset
shim
die
applicationcontext
point-sprites
jquery-selectbox
fileutils
junit3
gethashcode
email-spec
gwt-2.2-celltable
google-instant
openwysiwyg
callgrind
winsnmp
castle-validators
data-entry
writing

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App