views:

693

answers:

1

I have a data structure like this:

MyDataStructure{
  string Name{get;set}
  string Title{get;set;}
  IDictionary<string, bool> Values{get;set;}
}

I want to display items from an array of this structure in a data grid type of display

Name | Title | {Values[0].Name} | {Values[1].Name} | ... | {Values[N].Name}

Any suggestions?

A: 

Hi, I think that you could find something from question (here) I was having the same issue few days ago. Briefly I have found only two solutions:

  • using reflection to "transform" your Dictionary to a runtime generated class with the properties taken from the Dictionary itself (the properties name will be taken, for examle from key value)

  • using a Dynamic Language (such IronPython) to do the same thing described before but in a simplier way (I haven't tested it yet)

I don't know right now if this will be fixed in SL3. Right now seems to not be possible to bind using "position".

If you find any other solution is well accepted :)

Giorgio

krumikaze