views:

167

answers:

2

I'm playing around with the DataGridView control offered by .NET. Upon till now I seem to be unable to bind an (I)List to a DataColumn. Is this possible and how should I go around doing this?

A: 

Maybe you should take a look at the BindingList class.

Konamiman
A: 

I think this link will answer your question: Binding List to datagridview

If you bind a List<string> directly to the Datagridview, you will just get the Lengths of the string in the column since it is the only property on each string in the list. You need to set something up where the string itself will be available as a property. So the Datagridview.Datasource will be the instance of the class that enapsulates IList<> and Datagridveiw.Datamember will be set to the property that returns the string.

jomtois