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

The Archive Base Latest Questions

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

Assume there is the BindingList<Person{Name, age}> class and a PersonManager class that hosts the

  • 0

Assume there is the BindingList<Person{Name, age}> class and a PersonManager class that hosts the list.
In the application, every control is bount to the person list, in order to manipulate it or getting updated. Eg. A listbox that has the names of the persons, a control that updates the age for the selected person etc.

I want now to implement a “Do I Need To Save” mechanism for this. Somehow, the ui must know whether the PersonManager has been changed in order to save it.

My though is to catch the INotifyPropertyChanged event that Person implements and create an event in PersonManager that is fired when a propertyChangedEvent is raised.
Something like an event forwarding mechanism.

This seems to be error prone. Any suggestions on how to make it better?

  • 1 1 Answer
  • 3 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-26T14:13:54+00:00Added an answer on May 26, 2026 at 2:13 pm

    If the items in a BindingList implement INotifyPropertyChanged then the BindingList’s ListChanged event will fire when one of the items PropertyChanged event fires.

    Therefore you only need to handle the BindingList’s ListChanged event in your PersonManager and set a dirty boolean flag (dirty being the typical signifier of stale or unsaved data) in your PersonManager. Then, the application can ask the PersonManager if any data is dirty. When the application saves the data, it tells the PersonManager to reset the dirty flag. If you PersonManager also handles the saving of the data then it can reset its own flag.

    Hope this helps.

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

Sidebar

Related Questions

Assume there is a class Person {Name} and we want to bind the name
We all know that most applications out there assume class names to follow the
Assume there's an application that uses a static library, and that static library is
Assume there are class A , and class B that inherits A. what is
Assume there is an abstract class with a constructor that calls a protected abstract
Assume that there's no problem with my header file and some included library. I'm
Assume there are potentially expensive operations to be performed in setup or teardown that
Assume there exists an XML instance document that looks like this: <root> <object type=foo>
Assume there's a relational database with 3 tables: Courses {name, id}, Students {name, id},
I assume there might be a HTML5 or some JS that can be used

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.