Using collection as data object to a DataGrid

D

David K.

Hi all,

I had created an Windows Forms project. I have created several struct
objects (with three fields) and added them to ArrayList collection. Next, I
tried to use that collection as a data object and assign it to the
DataSource property of a DataGrid control. Unfortunately, the DataGrid
control didn't display any data.
Can you tell me, please, what I did wrong?
 
J

Joe Mayo

Hi David,

Wrap the fields with public properties and the properties will bind.

Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top