我正在从头开始创建一个 Google DataTable Net Wrapper DataTable。但我不知道如何向数据表添加行。我已经进展到如下代码
Google.DataTable.Net.Wrapper.DataTable GDt = new Google.DataTable.Net.Wrapper.DataTable();
for (int i = 0; i < dtReports.Columns.Count; i++)
{
Google.DataTable.Net.Wrapper.Column gc = new Google.DataTable.Net.Wrapper.Column();
gc.Id = dtReports.Columns[i].Caption.Substring(0, dtReports.Columns[i].Caption.IndexOf("~"));
gc.Label = dtReports.Columns[i].Caption.Substring(dtReports.Columns[i].Caption.IndexOf("~"), dtReports.Columns[i].Caption.Length);
GDt.AddColumn(gc);
for (int j = 0; j < dtReports.Rows.Count; j++)
{
Google.DataTable.Net.Wrapper.Row gr = GDt.NewRow();
// Code to add datatable current column and row value to Google Row
}
}
无法找到将值添加到行和特定列的代码。帮助表示赞赏。