Binding DataGrid columns to members of a collection.

I am binding a windows form datagrid to a collection of objects. This works fine and I can see the public properties of the objects.

One of these public properties of each object is a custom collection inherited from DictionaryBase. How can I bind my datagrid to members of the dictionary?

Thank you!

[305 byte] By [GoodCook] at [2007-12-16]
# 1
I did find a solution: HOW TO: Implement a Custom DataView Class in Visual Basic .NET

http://support.microsoft.com/default.aspx?scid=kb;en-us;325682

The key here seems to be the PropertyDescriptor that allows us to present properties and write code to determine what they will be connected to.

Anyone have any better solutions or comments?

GoodCook at 2007-9-9 > top of Msdn Tech,Windows Forms,Windows Forms Data Controls and Databinding...
# 2
That is the closest thing you can do. The problem is that your business object is a "one" and your collection is a "many" type relationship, so implementing your own DataView is the best way to go.

-mark
Program Manager
Microsoft
This post is provided "as-is"

MarkRideout at 2007-9-9 > top of Msdn Tech,Windows Forms,Windows Forms Data Controls and Databinding...