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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:16:47+00:00 2026-06-02T05:16:47+00:00

Here is my scenarion: I have a GridControl bound to a BindingList. At first

  • 0

Here is my scenarion:

I have a GridControl bound to a BindingList. At first what I was doing was creating a worker thread and access the BindingList directly, but this was throwing a “Cross-thread operation detected”, so I followed the guide here:

http://www.devexpress.com/Support/Center/p/AK2981.aspx

By cloning the original BindingList into the worker thread and changing that one, I got the desired effect. However, I recently implemeneted the INotifyPropertyChanged into the object that is held into the BindingList, and I started getting the error again.

My guess is that the GridView is still listening to the INotifyPropertyChanged from the object.

How can I fix this?

My class:

public class Proxy : INotifyPropertyChanged
{
    public event PropertyChangedEventHandler PropertyChanged;

    protected void OnPropertyChanged(string name)
    {
        PropertyChangedEventHandler handler = PropertyChanged;
        if (handler != null)
        {
            handler(this, new PropertyChangedEventArgs(name));
        }
    }
  • 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-02T05:16:48+00:00Added an answer on June 2, 2026 at 5:16 am

    If you are manipulating the UI from outside of the UI thread (such as from a worker thread), then you need to rejoin the UI thread. You can do this by calling Invoke on the UI control. You can test if this is required by using InvokeRequired.

    The pattern typically used is this:

    public void ChangeText(string text)
    {
       if(this.InvokeRequired)
       {
          this.Invoke(new Action(() => ChangeText(text)));
       }
       else
       {
          label.Text = text;  
       }
    }
    

    In your case the UI is being manipulated as a result of INotifyPropertyChanged, so you need to make sure that either you always modify your entity on the UI thread (using the above technique), or use a generic asynchronous INotifyPropertyChanged helper. This is a wrapper around the item being bound. It uses the above technique to ensure the ChangeProperty event fires on the UI thread.

    Here’s a very crude example of a proxy for an Entity class. This ensures that the property change event rejoins the UI thread, and keeps the entity itself unmodified. Obviously you’ll probably want to implement this more generically using DynamicObject for instance.

    public class NotificationHelper : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
    
        private readonly ISynchronizeInvoke invokeDelegate;
        private readonly Entity entity;
    
        public NotificationHelper(ISynchronizeInvoke invokeDelegate, Entity entity)
        {
           this.invokeDelegate = invokeDelegate;
           this.entity = entity;
    
           entity.PropertyChanged += OnPropertyChanged;
        }
    
        public string Name
        {
           get { return entity.Name; }
        }
    
        private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (PropertyChanged != null)
            {
               if (invokeDelegate.InvokeRequired)
               {
                   invokeDelegate.Invoke(new PropertyChangedEventHandler(OnPropertyChanged),
                                         new[] { sender, e });
                   return;
               }
               PropertyChanged(this, e);
            }
         }
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the scenario: I have a repeater inside an UpdatePanel called updPanel. Inside this
Kind of a strange question, but here is my scenario: I have accidentally added
Here is the scenario: I have successfully bound two objects from a native ObjC
This is my first post on StackOverflow, so please be gentle... I have some
Here's scenario: I have 2 activities and one service First activity is a landing
Here is the scenario: We have multiple clients,dealers and staff in our application. this
Here's my scenario - I have an SSIS job that depends on another prior
Here's the scenario: You have a Windows server that users remotely connect to via
Here's the scenario: I have a textbox and a button on a web page.
Here's the scenario: You have an ASP.Net application supported by a Microsoft SQL Server

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.