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 8990015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:24:13+00:00 2026-06-15T22:24:13+00:00

I have a database table that loads to a DataTable object which is binded

  • 0

I have a database table that loads to a DataTable object which is binded to multiple UIElements such as DataGrid, ComboBox, TextBoxes etc’s ItemsSource property. Is there a way where I am implement a “watch dog” that constantly check if the DataTable or DataSet has been changed and automatically update the database on a separate thread?

My goal is to eliminate the need for the client having to manually trigger a “Save” event to propagate these changes to the database, and that the database is always in-sync with the data in DataSet/DataTable. Please also suggest if this is a good practice or is there a better alternative.

  • 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-06-15T22:24:14+00:00Added an answer on June 15, 2026 at 10:24 pm

    The DataTable object has many events that get triggered on row data change.
    You could use RowChanged/RowChanging, RowDeleted/RowDeleting

    See a full documentation on MSDN

    You could add an event handler for a RowChanging event in this simple way

    yourTable.RowChanging += new DataRowChangeEventHandler(yourRowChangingHandler);
    

    and then add the handler

    private void yourRowChangingHandler(object sender, DataRowChangeEventArgs e)
    {
        Console.WriteLine("Action={0}", e.Action);
    }
    

    where the Action property is an enum that describes the operation

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

Sidebar

Related Questions

I have a datatable loaded from a table of a database that contains elements
I have a database table that has a Unique Key constraint defined to avoid
I have a database table that is a dictionary of defined terms -- key,
that my problem: I have database table like that: id (AI) market_id 1 6
I have a large database table that I need to display on a Windows
I have a database table TravelRequest that contains, amongst other things, the fields SignOffName
I have a very simple database table that joins two other tables in a
I have some code to update a database table that looks like try {
I have a MySQL database table called Participant that looks something like this: (idParticipant)
I have a database table with some rows that I want to fetch using

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.