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();
}
Is it possible to change the numbers inside the bracket into column name? How?