Binding collections to DataGridView in Windows Forms
Posted
by Sergey
on Stack Overflow
See other posts from Stack Overflow
or by Sergey
Published on 2010-04-25T12:03:55Z
Indexed on
2010/04/25
12:13 UTC
Read the original article
Hit count: 193
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?
© Stack Overflow or respective owner