A DataGridView control won't bind directly to an IEnumerable object, so two options are:
1. Create a BindingSource, set its DataSource to the IEnumerable object, then set the DataGridView.DataSource property to the BindingSource.
2. Bind the DataGridView.DataSource property to the IEnumerable object's ToList() method.
Thanks to Ken Tucker on Microsoft Forums for this tip.
Showing posts with label empty grid. Show all posts
Showing posts with label empty grid. Show all posts
Thursday, April 3, 2008
Subscribe to:
Posts (Atom)