This is a migrated thread and some comments may be shown as answers.

Building a hierarchy with a dictionary

0 Answers 10 Views
GridView
This is a migrated thread and some comments may be shown as answers.
GM72
Top achievements
Rank 1
GM72 asked on 22 Mar 2011, 04:17 PM
Hi,

I a class that contains a dictionary. I am trying to bind this to a gridview.

The class would be something like int, string, dcitionary

I want the classes main properties to be on row 0 and the dictionary values to be on row 1

e.g.  row 0 - int, string
            row 1 - dict[0] dict[1]
            row 1 - dict[0] dict[1]
        row 0 - int, string
            row 1 - dict[0] dict[1]

I have created a property relationship, which works fine. I also get the correct rows in the hierarchy level(the number of dictionary items varies) ... I'm just missing the data.


eg  
        row 0 - 1, string1
            row 1 - AA0 AA1
            row 1 - AB0 AB1
        row 0 - 2 string2
            row 1 - BA0 BA1

turns out as
        row 0 - 1, string1
            row 1 - blank blank 
            row 1 - blank blank
        row 0 - 2 string2
            row 1 - blank blank

I have done this fine when using a class within a class eg Department\Employees List

My databinding in the dataloading section is new Binding("DictionaryName[0]") , new Binding("DictionaryName[1]")

It does hit this binding as the headers appear.

Any ideas?


No answers yet. Maybe you can help?

Tags
GridView
Asked by
GM72
Top achievements
Rank 1
Share this question
or