if (e.RowIndex >= 0)
{
//gets a collection that contains all the rows
DataGridViewRow row = this.tbl_deliveryDataGridView.Rows[e.RowIndex];
//populate the textbox from specific value of the coordinates of column and row.
noTextBox.Text = row.Cells[0].Value.ToString();
supplierTextBox.Text = row.Cells[1].Value.ToString();
invoiceNumberTextBox.Text = row.Cells[2].Value.ToString();
dRNumberTextBox.Text = row.Cells[3].Value.ToString();
pONumberTextBox.Text = row.Cells[4].Value.ToString();
}
是否可以将括号内的数字更改为列名?怎么样?