Max
Max

Reputation: 19994

DataGridView data-bound to a list is not updated

I have a DataGridView databound to BindingSource which is in turn connected to a list of objects. After the data bindings are set up I'm populating the list from the background thread (using Form.Invoke of course). The problem is that the Grid is not updated. I can see in the debugger that the BindingSource contains items and DataGridView is connected to it, but the items are not displayed. What is wrong?

Upvotes: 0

Views: 251

Answers (1)

Max
Max

Reputation: 19994

I figured this out. I need to use BindingList<> instead of List<>.

Upvotes: 1

Related Questions