1
Good morning, I am cracking my head to add a row of a grid from my Form1 to the grid of my form2.
Below follows my code to simplify my doubt.
ItemVendaView item = new ItemVendaView()
            {                    
                ProdutoID = produto.ProdutoId,
                CodigoBarra = produto.CodigoBarra,
                ValorVenda = produto.ValorVenda1,
                ValorCusto = produto.ValorCusto,
                Quantidade = 1,
                ProdutoDescricao = produto.DescricaoReduzida
            };                
            ITENS.Add(item);        
this code above is the main form where I want to send the product form data to the main form.
below follows the code of the product form where I locate the product and give a enter and send to the main form.
 private void frmProdutos_Load(object sender, EventArgs e)
    {
        SetaTituloForm("Buscar Produto");
        gridProdutos.DefaultCellStyle.Font = new Font("Tahoma", 11);
        gridProdutos.AutoGenerateColumns = false;
        gridProdutos.DataSource = produtobll.SelecionarTodos();
        gridProdutos.Refresh();
    }
thank you
How are Forms related? By any chance Form1 opens form2 or they are already opened by another form?
– rodrigogq