How to import data from Datagridview to textboxs

Asked

Viewed 57 times

0

As I do,when I click the modify button bring the data from a Datagridview row to the top fields and also if I save as inactive leave the line as Enabled = false.

inserir a descrição da imagem aqui

  • Web Forms? Or Windows

  • The form type, right? if it is Windows Form.

1 answer

0

txtCodigo.text = dataGridView.Rows[indiceDaLinha].Cells["nomeDaCelula"].Value.toString();

To name the same thing.

For the Radios you do:

if(dataGridView.Rows[inicideLinha].Cells["nomeDaCelula"].Value.toString().Equals("Inativa"))
{
    radioButtonInativa.checked = true;
}

You may need to make some corrections regarding the name of your components. But this is how I would do.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.