Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 579377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:21:38+00:00 2026-05-13T14:21:38+00:00

I have a database with a table that records data coming from various sources.

  • 0

I have a database with a table that records data coming from various sources.
3 columns

‘Source’ ‘Value’ ‘Timestamp’

e.g.

source1 21 ’11:03′

source6 22 ’11:03′

source9 456 ’11:03′

The table is updated 2 to 3 times a second.
Each Value may or may not change.
Each ‘Source’ value is displayed in a seperate label or text box on the screen (not in a grid).
I need to find the best method to get this data to bind to WPF contols.
What type of object should I hold the data in Dictionary, DataTable etc.

What type of object is going to hold the data?
How do I bind my Label or TextBox to the value.

I query the sources 2 to 4 times a second.
The vast majority of the time the values in the database table won’t change
Often it is only one value that changes
Sometimes they all change
I only expect to have upto about 30 unique datasources.

Put your thinking caps on please.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T14:21:39+00:00Added an answer on May 13, 2026 at 2:21 pm

    Just by chance I’m working through a very similar problem. Like me, I am assuming that you are updating the data in a background thread.

    Collections

    Use MTObservableCollection instead of ObservableCollection to store the data. A ObservableCollection is normally used for data binding on stuff that can change, but it can’t be updated from a background thread. MTObservableCollection works for me, but it isn’t inheritently thread safe so be careful.

    http://www.julmar.com/blog/mark/2009/04/01/AddingToAnObservableCollectionFromABackgroundThread.aspx

    Models

    Each object should implement INotifyPropertyChanged Interface. This will make them support data binding. Also, WPF allows you to update properties this way on brackground threads.

    http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged.aspx

    Prefer Update over Clear and Add

    Make sure you always update objects when you can. Don’t just clear the collection and reload it, that will be very expensive and cause adverse UI effects. Of course you can do individual adds and removes when needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Many applications have grids that display data from a database table one page at
I Have a set of choices(options) coming from Database(around 36 records) which I have
I have a database table that i want to allow my friends to update.
I have a Database table that I want to display in a DataGridView. However,
Suppose I have a database table that has a timedate column of the last
Another basic Rails question: I have a database table that needs to contain references
In one of my applications I have a 1gb database table that is used
I have a database that contains a table that looks a bit like this:
I have a database table on a development server that is now fully populated
I have an app that needs to check a database table every minute. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.