My codes:
private void dvgFacturacao_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex >= 0)
DataGridViewRow row = this.dvgFacturacao.Rows[e.RowIndex];
if (dvgFacturacao != null)
txtBox1.Text = row.Cells["company"].Value.ToString();
txtBox2.Text = row.Cells["cod"].Value.ToString();
txtBox3.Text = row.Cells["nacionality"].Value.ToString();
}