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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:51:20+00:00 2026-05-14T18:51:20+00:00

I am trying to learn more about BindingList because I believe that it will

  • 0

I am trying to learn more about BindingList because I believe that it will help me with a project that I am working on.

Currently, I have an object class (ScannedImage) that is a subtype of a class (HashedImage) that subtypes a native .Net object (Image). There is no reason why I couldn’t move the two subtypes together. I am simply subtyping an object that I had previously constructed, but I will now be storing my ScannedImage object in an RDB (well, not technically – only the details and probably the thumbnail).

Also, the object class has member types that are my own custom types (Keywords). I am using a custom datagridview to present these objects, but am handling all changes to the ScannedImage object with my own code. As you can probably imagine, I have quite a few events to handle that occur in these base types.

So, if I changed my object to implement INotifyPropertyChanged, would the object collection (implementing BindingList) receive notifications of changes to the ScannedImage object?

Also, if Keywords were to implement INotifyPropertyChanged, would changes be accessible to the BindingList through the ScannedImage object?

Sorry if this seems rather newbish. I only recently discovered the BindingList and not having formal training in C# programming – am having a difficult time moving forward with this.

Also, if anyone has any good reference material, I would be thankful for links. Obviously, I have perused the MSDN Library. I have found a few good links on the web, but it seems that a lot of people are now using WPF and ObservableCollection.

My project is based on Winforms and .Net3.5 framework.

TIA

  • 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-14T18:51:21+00:00Added an answer on May 14, 2026 at 6:51 pm

    I’ll answer both of your questions:

    [I]f I changed my object to implement INotifyPropertyChanged, would the object collection (implementing BindingList) receive notifications of changes to the ScannedImage object?

    If you actually use the BindingList<T> class inside System.ComponentModel, then it does contain special-case code for elements that impelment INotifyPropertyChanged. The list will see the property changes and will send out notifications.

    However, you specifically ask about “implementing BindingList” which is subtly different. You can’t implement a class. But there is an interface, IBindingList, that you can implement with your own class, and if this is the route you choose to take, then it becomes your responsibility when you write the list class to ensure that you monitor for property change notifications.

    Generally you shouldn’t need to create your own IBindingList implementation; just use BindingList<T> to wrap an existing list and you’ll be fine.

    Also, if Keywords were to implement INotifyPropertyChanged, would changes be accessible to the BindingList through the ScannedImage object?

    No, they will not. BindingList<T> only looks at the specific object in the list, it has no ability to scan all dependencies and monitor everything in the graph (nor would that always be a good idea, if it were possible).

    What you’ll have to do if you want to receive notifications is update your ScannedImage class to check for property change notifications from the Keywords object, then fire its own PropertyChanged event in response.

    Example:

    public class ScannedImage : INotifyPropertyChanged
    {
        private Keywords keywords;
    
        protected void OnPropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
            {
                PropertyChangedEventArgs e = new 
                    PropertyChangedEventArgs(propertyName);
                handler(this, e);
            }
        }
    
        private void KeywordsChanged(object sender, PropertyChangedEventArgs e)
        {
            OnPropertyChanged("Keywords");
        }
    
        private void SetKeywords(Keywords newKeywords)
        {
            Keywords oldKeywords = this.keywords;
            this.keywords = null;
            if (oldKeywords != null)
                oldKeywords.PropertyChanged -= KeywordsChanged;
            this.keywords = newKeywords;
            if (newKeywords != null)
                newKeywords.PropertyChanged += KeywordsChanged;
        }
    
        public Keywords Keywords
        {
            get { return keywords; }
            set { SetKeywords(value); }
        }
    
        public event PropertyChangedEventHandler PropertyChanged;
    }
    
    public class Keywords : INotfifyPropertyChanged { ... }
    

    I hope you understand what’s being done here. The owner, ScannedImage, automatically hooks the PropertyChanged event from its inner Keywords class and raises a separate property changed event saying that the Keywords have changed. This way, binding lists and other data binding controls will receive notification when the keywords change.

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

Sidebar

Related Questions

I am trying to learn more about regular expressions I have one below that
I'm currently trying to learn more about object oriented design in C++ (familiar with
I am trying to learn more about the DOM and have been writing some
I'm trying to learn more about WPF. I ran through an online tutorial that
Right now i am trying to learn more about java threading, and i have
I'm trying to learn more about 'ajax' and so far have had the most
I'm trying to learn more about Flask for a project, and I'm wondering if
I am trying to learn more about matrices. If I have a 4x4 matrice
I have been trying to learn more about lambda expressions lately, and thought of
I'm playing and trying to learn a little more about AJAX in MVC. Currently,

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.