I'm using DispatcherTimer() to call update function to update listview from database where data is updated somewhere else. So, the listview is used as if dashboard.
private void Update(){
DateTime d = DateTime.Today;
items = (from i in DataManager.Entities.signals
where i.Date > d
orderby i.Id descending
select i).Take(MAX_NUM_OF_DISPLAYED);
this.lvDashboard.ItemsSource = items;
}
It works fine until it reaches to certain amount of data. I know I can query last updated data in database and add it to itemssource. I'm trying to make my code simple and clear. Could you give any ideas or suggestions?
---------------- update ---
It updates every 1-2 seconds with 1000 rows of data and the data window keeps moving to the recent data. Some reason the process memory keeps growing. Is DataTable monitors DB updaates?? If the DB is updated some other places, does DB binded DataTable update itself?