我试图在GridView中创建包含内容的图表,现在我有了这些代码:
string js0 = @"var data = {}; CarregarGrafico(data);";
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Graph0L", js0, true);
var i = 0;
foreach (GridViewRow row in GridView1.Rows)
{
string periodo = "" + row.Cells[0].Text + "/" + row.Cells[1].Text + "";
string prevReceb = row.Cells[6].Text.ToString();
string totalReceb = row.Cells[10].Text.ToString();
string js1 = @"myBarChart.addData([{1}, {2}], '{0}');";
js1 = js1.Replace("{0}", periodo).Replace("{1}", prevReceb).Replace("{2}", totalReceb);
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Graph1L", js1, true);
i++;
if (i >= 10) break;
}
但我正在处理一些问题:
<span>
标记中。如何仅将文本用于单元格的跨度?拜托,帮助我,谢谢。