How to import data from DataGridView to textboxs

0

As I do for, when I click the Modify button bring the data from a row of the DataGridView to the fields above and also if I save as inactive leave the row as Enabled = false.

    
asked by anonymous 02.07.2016 / 20:45

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 to the name of your components. But that's how I would do it.

    
07.07.2016 / 18:59