private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
DataTable mytable=new DataTable();
DataColumn column=new DataColumn();
column.DataType=Type.GetType("System.String");
column.ColumnName="id";
mytable.Columns.Add(column);
column=new DataColumn();
column.DataType=Type.GetType("System.String");
column.ColumnName="name";
mytable.Columns.Add(column);
DataRow row=mytable.NewRow();
row["id"]="1";
row["name"]="yexf";
mytable.Rows.Add(row);
BoundColumn column2=new BoundColumn();
column2.DataField="id";
column2.HeaderText="yexf";
DataGrid2.Columns.Add(column2);
DataGrid2.DataSource=mytable;
DataGrid2.DataBind();
}