Israel

Israel

  • 699
  • 1.3k
  • 217.3k

Selected values from datagridview doesnt appear on textbox..

Jul 24 2014 2:51 PM
Hi!

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();
                    
            }

Answers (4)