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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:30:22+00:00 2026-05-27T13:30:22+00:00

I have a DataGridView with its source set to BindingSource , whose source is

  • 0

I have a DataGridView with its source set to BindingSource, whose source is set to BindingList that cotains objects that implement INotifyPropertyChanged. The problem is, the logic that updates items in my BindingList runs in a separate thread. Everything is absolutely fine, but I’m not sure why it works at all. Is there any logic in any of these to handle cross-thread access? What’s the right approach in this case?

BindingSource _actionsBindingSource; // it's DGV's source
BindingList<IAction> _actionsList = ...;
...
interface IAction : INotifyPropertyChanged
{
   ...
}
...
actionsBindingSource.DataSource = _actionsList;
...
public void FireActions()
{
  new Thread(() =>
  {
    foreach (IAction action in _actionsList)
    {
      action.Execute(); // fires some PropertyChangedEventArgs events from non-UI thread
    }
  }).Start();    
}

So, I’m curious about my FireActions() method.

  • 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-27T13:30:23+00:00Added an answer on May 27, 2026 at 1:30 pm

    I would suggest you to run your code in the UI Thread instead of using another thread. The issue that when data are changing the binding source, it ultimately changes the blinding control. Therefore you need to load the data to using the UI Thread and not a worker thread.

    An example would be a BindingSource links to a DataTable, and a DataGrid binds to the BindingSource. You may think why not use a worker thread to load the data to the DataTable, which would avoid locking the UI Thread. However, this wouldn’t work because BindingSource ultimately need to update your DataGrid, which is an UI operation.

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

Sidebar

Related Questions

I have a DataGridView. I set its .DataSource prop to be an BindingList of
I have a DataGridView with its datasource set to a generic list of custom
I have a DataGridView, which is not set to ReadOnly. None of its columns
I have a DataGridView that is filled by setting its DataSource to a DataBinding.
I have a DataGridView with a BindingSource as it's data source and a DataTable
So I have this datagridview that is linked to a Binding source that is
I have a DataGridView that has a class as its DataSource. The class contains
I have a datagridview its datasource is set to a data view -> data
I have a DataGridView that I want to query using Linq (C# WinForm). I
I have a DataGridView control in a winforms app that I'm working on. The

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.