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

  • SEARCH
  • Home
  • 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 6388437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:16:42+00:00 2026-05-25T03:16:42+00:00

I bind my control to a dataset like this: txt.DataBindings.Add(Text, ds, true, DataSourceUpdateMode.OnPropertyChanged); Then

  • 0

I bind my control to a dataset like this:

txt.DataBindings.Add("Text", ds, true, DataSourceUpdateMode.OnPropertyChanged);

Then I add listeners for changes like this

private void attatchChangeListeners(DataSet ds)
        {
            foreach (DataTable dt in ds.Tables)
            {
                dt.RowChanged += new DataRowChangeEventHandler(dt_RowChanged);
                dt.RowDeleted += new DataRowChangeEventHandler(dt_RowDeleted);
                dt.TableNewRow += new DataTableNewRowEventHandler(dt_TableNewRow);
            }

        }

        void dt_TableNewRow(object sender, DataTableNewRowEventArgs e)
        {
            if (!View.Dirty)
            {
                View.Dirty = true;
            }
        }

        void dt_RowDeleted(object sender, DataRowChangeEventArgs e)
        {
            if (!View.Dirty)
            {
                View.Dirty = true;
            }
        }

        void dt_RowChanged(object sender, DataRowChangeEventArgs e)
        {
            if (!View.Dirty)
            {
                View.Dirty = true;
            }
        }

But when i change value in textbox in form i do not get the events.

I have to call endEdit on all rows for the events to be triggered.

Have i misunderstood the databinding or am i doing something else wrong?

  • 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-25T03:16:43+00:00Added an answer on May 25, 2026 at 3:16 am

    Yes at “misunderstood” :-).

    Databinding can be thought as a middle layer between the UI objects and the DataSouce (typically a DataTable in a DataSet). To get the changes from UI take effect in the underlying DataSource, you have to call the BindingSource’s EndEdit. Likewise, if you decide NOT to you can always cancel the changes using the “CancelEdit” (that is, if you want to revert the changes made by the UI to get back your DataSource’s values). You might want to wire the CurrentItemChanged Event of the BindingSource to suit your requirement.

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

Sidebar

Related Questions

how to bind the data from datase to gridivew footer control like text box.
I would like to bind a TreeView control I have defined in XAML to
I would like to bind C-` (control-backquote) but I could not do it. The
I want to bind Repeater control to Dataset which is filled with XML data,
I have a tree view control which I have to bind a dataset with
I got the data from database into my dataset is and then i bind
If you bind a control in a FormView using two way binding (such as
When I bind a control to an NSArrayController using Interface Builder, there are a
I'm trying to bind a TreeView control to the public folders the machine ASUS-PC
I want to bind my ListView control to a generic list of objects? I

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.