Datagridview and collection in VB.net

V

Vanny

How to show all rows in the datagridview from a collection? When I try to
populate the datagridview from a list(of T) collection, I can see many rows
but they all the same. It looks like it shows only the last element of the
list.

What I did in code is just build a collection of my class as list and
assign it to the datagridview.datasource. What else should I do?

Thanks in advance for your help

Vanny
 
C

Cor Ligthert[MVP]

Vanny,

When you show the code which set the list to the datasource, then it is
probably easier for us to give you some help with that.

Cor
 
V

Vanny

Thank you for looking at my question. It is working now, I think it was an
error in the collection.

Vanny
 
C

Cor Ligthert[MVP]

Robin,

Why?

By the way the OP uses a geneneric collection with a bindingsource (the
latter I assume, the OP did not show that), the recommended way by
Microsoft.
The generic collection BindList is described for special situations,
therefore I am curious why it is for you in general better?

Cor
 

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