0
Friends good night. I am having difficulties in processing the data of a datagridview, I need that when the user clicks on the line, it is assigned to a variable, the value of the cell, of the first column of the line that the user selected.
So I created an event of the type Selectionchanged, within that event includes:
private void clik_table_cliente(object sender, EventArgs e)
{
// vamos obter a linha da célula selecionada
DataGridViewRow linhaAtual = dataGridView1.CurrentRow;
// vamos exibir o índice da linha atual
int indice = linhaAtual.Index;
MessageBox.Show("O índice da linha atual é: " + indice);
}
I can know which row is selected, but now, how to assign the value of the cell, the first column of that row?
Thanks for the help.
Thank you very much friend, I was doing the wrong syntax. Thanks
– Thomas Erich Pimentel
I’m glad it worked!
– Emerson JS