DataTable dt = new DataTable();
dt.Columns.Add("编号");
dt.Columns.Add("内容");
for (int i = 0; i < 10; i++)
{
DataRow dr = dt.NewRow();
dr[0] = i.ToString();
dr[1] = "this is " + i.ToString();
dt.Rows.Add(dr);
}
GridView1.DataSource = dt;
GridView1.DataBind();