When I select one row on my datagridview I doesnt see it on my textbox. Please have a look on my codes.
private void dgvPermissoes_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex >= 0)
{
DataGridViewRow row = this.dgvPermissoes.Rows[e.RowIndex];
txtNomePermissoes.Text = row.Cells["nome"].Value.ToString();
txtSobrenomePermissoes.Text = row.Cells["sobrenome"].Value.ToString();
txtUsuarioPermissoes.Text = row.Cells["usuario"].Value.ToString();
txtSenhaPermissoes.Text = row.Cells["senha"].Value.ToString();
txtResultMaleFemale.Text = row.Cells["sexo"].Value.ToString();
}

VulpesRank #55 · 29.2K reputationPosted Jul 24, 2014, 1:19 PM EDT
If that's the case, the CellClick event may be your best option.
VulpesRank #55 · 29.2K reputationPosted Jul 24, 2014, 11:54 AM EDT
Are you sure that the handler is wired up to the CellContentClick event?
You can put this line in Form_Load to make sure it is:
IsraelRank #1,223 · 1.5K reputationPosted Jul 24, 2014, 12:54 PM EDT
IsraelRank #1,223 · 1.5K reputationPosted Jul 24, 2014, 1:35 PM EDT