breakoutfoo
New member
- Joined
- Dec 17, 2010
- Messages
- 2
- Programming Experience
- 1-3
Hi,
I have a dictionary (created using DictionaryBase) where the values are 'PostItems'. I want to display the 'PostItems' stored in the dictionary to a datagridview.
Each 'PostItem' object contains various simple properties (strings, integers and dates), a 'Contact' object and a dictionary (again created using DictionaryBase) of 'Message' objects. I have a number of problems to work out.
The first problem is how to bind a dictionary to a datagridview. I'm guessing from what I have read that this is not easliy acheivable so I created a temporary List(of PostItem) from the data contained within the dictionary which I can then bind to the datagridview - is this the best way to do it?
The second problem is that although this does display the simple data, my 'Contact' object displays as 'namespace.class' as it does not know which property in the class to display. Is there a way to specify which property in the 'Contact' class to display?
The third problem is the 'Message' dictionary property, which obviously cannot be evaulated to a single cell. This is not an essential for me to display but it would be nice to know if a datagridview can have expandable rows to display such collections within a row. Can anyone point me in the right direction?
Thanks
Andy
I have a dictionary (created using DictionaryBase) where the values are 'PostItems'. I want to display the 'PostItems' stored in the dictionary to a datagridview.
Each 'PostItem' object contains various simple properties (strings, integers and dates), a 'Contact' object and a dictionary (again created using DictionaryBase) of 'Message' objects. I have a number of problems to work out.
The first problem is how to bind a dictionary to a datagridview. I'm guessing from what I have read that this is not easliy acheivable so I created a temporary List(of PostItem) from the data contained within the dictionary which I can then bind to the datagridview - is this the best way to do it?
The second problem is that although this does display the simple data, my 'Contact' object displays as 'namespace.class' as it does not know which property in the class to display. Is there a way to specify which property in the 'Contact' class to display?
The third problem is the 'Message' dictionary property, which obviously cannot be evaulated to a single cell. This is not an essential for me to display but it would be nice to know if a datagridview can have expandable rows to display such collections within a row. Can anyone point me in the right direction?
Thanks
Andy