1金币
请问如何获取分组的数据?并转为DataTable?
下面是获取分组的代码,不知道正不正确,然后不知道如何将每个分组的数据转为DataTable
FarPoint.Win.Spread.Model.GroupDataModel gm = (FarPoint.Win.Spread.Model.GroupDataModel)spread.Sheets[0].Models.Data;
for (int i = 0; i < gm.Groups.Count; i++)
{
try
{
FarPoint.Win.Spread.Model.Group g = gm.Groups[i] as FarPoint.Win.Spread.Model.Group;
int row = g.Rows.Count;
if (g != null)
{
g.Text = g.GroupFooter.DataModel.GetValue(0, 4).ToString();
}
}
catch (Exception exc)
{
}
}
|
|