简体   繁体   中英

How to pass value from one form to other datagrids form

When I click on button "Adicionar"(add) opens new form (Picture 2)

I got all combobox and textbox's filled.

My question is, I click on button "Confirmar", how can I put this values from - "Produto", "Preço Unitário", "IVA" and "Quantidade" in 1st picture datagrid?

I don't know how to do it, if you guys can help, I'll appreciate it.

Thank you :)

It depends upon the way you are doing. If you are saving the data in some storage like in database or text file or any other storage, then you can get the data from respective resource and can load the load in the datagridview.

Eg : dgv.DataSource = Get data from source

If you are saving the data in global memory(like public static property to hold data), you can get data from that global memory and load that into the datasource of datagridview.

If you can share your code, how are you doing, We can suggest you some concrete implementation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM