I am working with a Windows Forms application binding a listbox to an arraylist using techniques as described in these two articles.
ListBox1.DisplayMember = "LongName";
ListBox1.ValueMember = "ShortName";
or for datagridview
dataGridView1.DataSource = customers;
In WPF you are able to bind to an observable collection and the grid will be automatically updated when there are changes to the list. But I cannot seem to replicate this in windows forms.
Is there something I am missing, or is this just not possible?
For “two-way” binding in Windows Forms, you need to use a collection that implements IBindingList.
There is some helpful information in this article.