Re: Help! how to get the content of each cell in a CellSet?
From: peter_zhang (zhangp_at_protect.com)
Date: 09/24/04
- Previous message: peter_zhang: "use ADOMD .net to get KPI"
- In reply to: Zhang JiDong: "Help! how to get the content of each cell in a CellSet?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 24 Sep 2004 19:00:47 -0400
you need to loop through the cellset, using an indexer to get the content.
look throught the following c# code
int[] cellIndex = new int[cells.Axes.Count];
for (int i = 0; i < cells.Axes[1].Positions.Count; i++)
{
cellIndex.SetValue(i, 1);
DataRow r = tbl.NewRow();
r[0] = cells.Axes[1].Positions[i].Members[0].Caption;
for (int j = 0; j < cells.Axes[0].Positions.Count; j++)
{
cellIndex.SetValue(j,0);
// first axis. create a datarow, add the id column for the datarow,
finally add row to table
r[j+1] = cells.Cells[cellIndex].Value;
}
tbl.Rows.Add(r);
}
- Previous message: peter_zhang: "use ADOMD .net to get KPI"
- In reply to: Zhang JiDong: "Help! how to get the content of each cell in a CellSet?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|