开发者

Silverlight data in matrix

Does anyone know how to arrange some data to a data matrix? A simple example:

For example the model would be the following:

public class SampleItem 
{
    public string Category { get; set; }
    public int DayOfMonth { get; set; }
    public double Value { get; set; }
}

I would like to have a List<Samp开发者_JS百科leItem> displayed in data matrix something like

DayOfMonth | 1 | 2 | 3 | 4 | ...
---------------------------- ...
Category1  |   | 7 |   |   | ...
Category2  | 2 |   | 5 |   | ...
Category3  | 1 | 6 | 5 | 1 | ...

So in the intersection of rows and columns it would display sum of Value where DayOfMonth = Column name and Category = row name.

Is it possible to have this? Maybe with non-static rows for categories and by any chance in a datagrid to enable grouping?


Since DataSet is not available within Silverlight you could use this DataSet perhaps just the DataSet type within that framework as it is geared towards something else. Once you have a table like structure you could simply walk the data or poll the data and define your sums as needed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜