c#如何把一行数据插入到datatable里面去?时间:2022-04-10 15:04:07DataTable dt = new DataTable(); dt.Columns.Add("ID"); dt.Columns.Add("Name"); DataRow dr = dt.NewRow(); object[] objs = { 1, "Name" }; dr.ItemArray = objs; dt.Rows.Add(dr); this.dataGridView1.DataSource = dt;