I'm trying to use a DataGridView to display the contents of a list.
When I run the program the DataGridView is blank - so I'm doing something wrong.
My understanding (or misunderstanding) was that I could bind a list to a datagridview and that would be all there was to it. For example:
Dim Inventory As New Collections.Generic.List(Of itemstochange)
'Loaded Inventory in the next few lines, left out to keep the question shorter
'I've looped through Inventory and it does fill correctly
'Inventory has three properties, sku, description & price
Dim source As New BindingSource
source.DataSource = Inventory
DataGridView1.DataSource = source
Do I have to loop through each item in the list to add it to the DataGridView? I thought (hoped) that "binding" would pretty much take care of all of that for me.
I'm new to Lists and DataGridViews, so please excuse this question if it's really simple. :)
Thanks for your help!