Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27184

VS 2010 Assigning a List to a DataGridView

$
0
0
Hi, Is it possible to assign a list to a datagridview?

Working with datatables and datagridviews seems reasonably simple but rather than convert a list I have into a datatable I wondered whether you could assign the list direct.

My list is a list of a bespoke class, something like


Private Class MyClass
Property A as String
Property B as String
Property C as String
End Class

I then have a list as follows

Private MyList As List(Of MyClass)

Is there a way to assign Property A to column1, Property B to column2 etc...

Any help appreciated.
Thanks,
N

Viewing all articles
Browse latest Browse all 27184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>