Doubt DataGridView in C #

0

I'd like to know what these code types are and what they're used for:

txtCodigo.Text = dtgProfessores.Rows[e.RowIndex].Cells["CODIGO"].Value.ToString();
txtNome.Text = dtgProfessores.Rows[e.RowIndex].Cells["NOME"].Value.ToString();
txtEndereco.Text = dtgProfessores.Rows[e.RowIndex].Cells["ENDERECO"].Value.ToString();
txtBairro.Text = dtgProfessores.Rows[e.RowIndex].Cells["BAIRRO"].Value.ToString();
txtCidade.Text = dtgProfessores.Rows[e.RowIndex].Cells["CIDADE"].Value.ToString();

I would like a clear and simple explanation. Thank you very much :)

    
asked by anonymous 01.02.2018 / 01:45

1 answer

0

The same goes for everyone, I'll explain only the first! It takes from Component DataGridView , element in line e.RowIndex , column " Codigo " and in this column the value that is inside it it converts using .toString() value in to String, and then places in of txtCodigo.text .

    
01.02.2018 / 04:38