Either you clear all the data in the listbox before adding them again or you do a check on the collection. I assume your eID is the primary key? The do something like this: if ( roomMeetingList.
Where ( entry => entry. EID == dbID ). Count () == 0 ) { // add } C# code, but it shows the idea developerFusion's convert made this VB: If roomMeetingList.
Where(Function(entry) entry. EID = dbID).Count() = 0 Then ' Add End If.
Cool this is something to work with (have become reasonably good at converting C#, just not any good at writing it). Now, would I add this to the MeetingList class? – Lima Aug 18 at 11:32 In the 'getRoomMeetingDetails' sub – Sascha Aug 18 at 11:35 Great, thanks for that makes it much easier.
Ill give it a go and see how it works. – Lima Aug 18 at 11:41 Cool, it has worked with only the data I added while the app running being visible in the application being shown. Is it possible to re-sort the data?
The data when first bound is sorted in date order, however the new data is added to the end of the list. – Lima Aug 18 at 11:56 Look at kiwigis.blogspot. Com/2010/03/… – Sascha Aug 18 at 12:07.
I have a WPF application which has a listbox bound to an ObservableCollection which retrieves it's data from a Database. I am attempting to have the ListBox data refreshed every minute through the use of a DispatcherTimer. Which calls the getRoomMeetingDetails method as follows.
What is happening is when the DispatcherTimer is called every minute, the ListBox data is duplicated which I believe is because the getRoomMeetingDetails method is adding all of the SQL results on every tick. How can I refresh the ListBox with only new data or data changes from the table? I am really struggling to work out where I am going wrong and what needs to be added/removed for this to work.
If there is any details I am missing please let me know.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.