Hello everybody,
I need to generate a GridView at runtime from a Dictionary<DateTime,Dictionary<string,double>>.
I would like to display the different DateTime keys in GridView columns. The rows header of the grid would be fill with string keys of the second dictionary and the cells with values of this dictionary.
I precise that the keys of the Dictionary<string,double> are the same whatever the DateTime you choose.
I would like to know if it is possible to do such a thing only using xaml and binding or if it is necessary to build the grid in the xaml.cs file or if I need to use another method.
There is an example of the expected result :
Thank you for your help.
Regards,
Thomas
I need to generate a GridView at runtime from a Dictionary<DateTime,Dictionary<string,double>>.
I would like to display the different DateTime keys in GridView columns. The rows header of the grid would be fill with string keys of the second dictionary and the cells with values of this dictionary.
I precise that the keys of the Dictionary<string,double> are the same whatever the DateTime you choose.
I would like to know if it is possible to do such a thing only using xaml and binding or if it is necessary to build the grid in the xaml.cs file or if I need to use another method.
There is an example of the expected result :
|
Date1 |
Date2 |
Date3 |
Date4 |
… |
Date m |
String1 |
0 |
1 |
1,8 |
2,8 |
… |
12,9 |
String2 |
0,5 |
16 |
15 |
5 |
… |
2,9 |
String3 |
2 |
8 |
18 |
6 |
… |
1,9 |
String4 |
4 |
7 |
12 |
1 |
… |
1 |
… |
… |
… |
… |
… |
… |
… |
String n |
0 |
6 |
17 |
24 |
… |
13 |
Thank you for your help.
Regards,
Thomas