//动态创建DataTable用来绑定到GridView。
DataTable dt_per = new DataTable();
DataColumn column_per;
column_per = new DataColumn();
column_per.DataType = System.Type.GetType("System.String");
column_per.ColumnName = "ord_nbr";
column_per.ReadOnly = true;
column_per.Unique = true;
dt_per.Columns.Add(column_per);
column_per = new DataColumn();
column_per.DataType = System.Type.GetType("System.String");
column_per.ColumnName = "ord_seq";
dt_per.Columns.Add(column_per);
DataRow dtr_per;
dtr_per = dt_per.NewRow();
dtr_per["ord_nbr"] = dt_trdord.Rows[i][0].ToString();//dt_trdord另一个DataTable
dtr_per["ord_seq"] = 方法(参数1, 参数2,……);
dt_per.Rows.Add(dtr_per);
=======================================================
DataTable dt = new DataTable();
dt.Columns.Add(DateTime.Today.AddMonths(-2).Month + "上上月");
dt.Columns.Add(DateTime.Today.AddMonths(-1).Month + "上月");
dt.Columns.Add(DateTime.Today.Month + "本月");
DataRow dr;
dr = dt.NewRow();
decimal d1 = 0, d2 = 0, d3 = 0;
//这块可以对d1、d2、d3赋值
dr[0] = d1;
dr[1] = d2;
dr[2] = d3;
dt.Rows.Add();
GridView_ID.DataSource = dt;
GridView_ID.DataBind();