Binding collections to DataGridView in Windows Forms
- by Sergey
I'm trying to bing collection to DataGridView. As it turns out it's impossible for user to edit anything in this DataGridView although EditMode is set to EditOnKeystrokeOrF2.
Here is the simplified code:
public Supplies()
{
InitializeComponent();
List<string> l = new <string>();
l.Add("hello");
this.SuppliesDataGridView.DataSource = l;
}
It also doesn't work when I change collection type to SortableBindingList, Dictionary or even use BindingSource.
What can be wrong here?