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();
}
VulpesPosted Jul 24, 2014, 5:19 PM
If that's the case, the CellClick event may be your best option.
IsraelPosted Jul 24, 2014, 5:35 PM
IsraelPosted Jul 24, 2014, 4:54 PM
VulpesPosted Jul 24, 2014, 3:54 PM
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: