I'm having some difficulties working with the data grid view selection field, I tried to do this:
public void Atualizar()
{
Stock obj = new Stock();
for (int A = 0; A < dgv_Entrada.RowCount; A++)
{
int ID_Cod = Convert.ToInt32(dgv_Entrada[1, A].Value);
obj.id_entrada = ID_Cod;
obj.estado = cb_Estado.Text;
}
obj.Actualizar();
}
When I execute, when I select more than one line, it only updates the data of the last line selected.
I'm not able to check the selected rows.