DataTable dtNew = new DataTable(); dtNew.Columns.Add("ItemNo");//序列号列 dtNew.Columns.Add("flowname"); dtNew.Columns.Add("flowcontent"); dtNew.Columns.Add("bussinessflowid"); int p = 1; for (int i = 0; i < dtOld.Rows.Count; i++) { DataRow dr = dtNew.NewRow(); dr["ItemNo"] = (p++).ToString(); dr["flowname"] = dtOld.Rows[i]["flowname"].ToString(); dr["flowcontent"] = dtOld.Rows[i]["flowcontent"].ToString(); dr["bussinessflowid"] = dtOld.Rows[i]["bussinessflowid"].ToString(); dtNew.Rows.Add(dr); } datalist.DataSource = dtNew; datalist.DataBind();