Displaying list of objects as single column in a bound gridview (Winforms)?

Posted by Carrie Nelson on Stack Overflow See other posts from Stack Overflow or by Carrie Nelson
Published on 2010-03-15T17:08:54Z Indexed on 2010/03/15 17:39 UTC
Read the original article Hit count: 274

Filed under:
|
|
|

I have a gridview that is bound to a datasource on a Windows Form (VB.NET). The grid displays a list of "certifications", and each "certification" can be associated with many languages. So in the grid, I'd like to display "languages" as a column, and display a comma delimited list of the language names for each "certification".

In the "certification" class, one of the properties is a list of "language" objects, and each "language" has an ID (guid), name (string), and value (integer).

So in the datasource, I have the list of "languages", but I can't figure out how to display them in a column on the grid. The gridview won't let me add the language list property as a column.

So is the ONLY way to add a new property on the "certification" class, which returns a string that contains the comma delimited list, and show THAT on the grid? Or is there a way to display that list of "languages"?

© Stack Overflow or respective owner

Related posts about winforms

Related posts about vb.net