//取單元格數(shù)據(jù)三種方法 this.dataGridView1[e.ColumnIndex, e.RowIndex].Value.ToString();//第一種取法 this.dataGridView1.Rows[e.RowIndex].Cells["你所要取值的列名稱"].Value.ToString();//第二種取法 this.dataGridView1.CurrentRow.Cells["你所要取值的列名稱"].Value.ToString();//第三種取法 注意讀取時單元格數(shù)據(jù)為null
|
|