Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do you correctly update a databound datagridview from a background thread
    primarykey
    data
    text
    <p>I have a custom object that implements INotifyPropertyChanged. I have a collection of these objects where the collection is based on BindingList I have created a binding source for the collection, and set the datasources of the bindingsource and datagridview.</p> <p>Everything works great, except I need to update properties on the custom object from background threads. when I do so, I get the following error : </p> <blockquote> <p>BindingSource cannot be its own data source. Do not set the DataSource and DataMember properties to values that refere back to BindingSource</p> </blockquote> <p>I found the following post that seems to have my exact problem (and solution?) but I cannot quite figure it out.</p> <blockquote> <p><a href="http://social.msdn.microsoft.com/forums/en-US/winformsdatacontrols/thread/3566f7c7-eb47-422e-ab09-9549a18da360/" rel="nofollow noreferrer">http://social.msdn.microsoft.com/forums/en-US/winformsdatacontrols/thread/3566f7c7-eb47-422e-ab09-9549a18da360/</a></p> </blockquote> <p>I created and initialized the oper variables per the post in my business object, and then I put the two event functions into my collection class. This compiled correctly, but hangs without exception when run.</p> <p>I have seen many posts saying to use Invoke/Begin Invoke, but I am not calling any functions on the UI, just updating business objects, so I am not sure where I would put the invoke calls. </p> <p>One restriction : I want the business object to remain unaware of who is displaying it (as there are multiple consumers) so sending in GUI references into the business object so that I am later able to call invoke using those references is not an option. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload