C#dataGridView1 给某一列赋值

C#dataGridView1_给某一列赋值


            for (int i = 0; i < dataGridView1.Rows.Count; i++)//循环dataGridView1的行
            {
                dataGridView1.Rows[i].Cells["订单号"].Value = "XST" + DateTime.Now.ToString("yyyyMMddhhmmss");
            }


winform代码