0

So I'm still having trouble figuring out how to do this correctly. I have datagridview on Form1. This is all the products available in the stockroom. The last column is a checkbox, what I want is for the user to check the box for each row they want to order. I then have Form2. There is another Datagrid on form2. I want form2 to display the selected rows from Form1's Datagrid. This just shows them the items they have in there cart before proceeding with ordering.

If code is needed I'll add, I didn't know if this questions needed anything specifically.

Lee
  • 95
  • 2
  • 9
  • 1
    This is very similar to [this question](http://stackoverflow.com/q/36358107/1070452) "moving" records from one control to another – Ňɏssa Pøngjǣrdenlarp Apr 06 '16 at 17:29
  • Do the users select items, then click a button to bring up form2 with desired contents? If so, your code for opening form2 would be helpful. You need to pass it information about the rows you want it to show. If you have both forms open at the same time, you will need some event driven methods to synchronize changes. – Kateract Apr 06 '16 at 17:30
  • I knew i'd hear from you. First let me thank you for taking the time these past cple weeks. Form1 has a button "Add to cart" that will then show Form2. Form2 doesn't have to stay open because they need to have the option to go back and add more items if they forgot some then reopen form2. Currently Form2 is GUI only, I have the Datagrid added, but there is no code. As I'm not sure how to take the selected rows and pass them to Form2's datagridview. – Lee Apr 06 '16 at 17:46
  • You really only have to connect the second DGV to a DataView which has the Selected or picked column as True. The rows will automatically show up. The only real difference in your question is a second form, which just means a matter of scope for it. BUT consider just putting both on the same form, perhaps on different tabs. If they are the same thing (Products, Items, Widgets etc) just a matter of whether they are picked or not, they might be better off on the same form. – Ňɏssa Pøngjǣrdenlarp Apr 06 '16 at 18:56
  • I understand what your saying, just not sure how to convey it in code. Since I have checkbox's on the DGV how to I assign those as selected rows to a new dataview or is it a new datatable? – Lee Apr 06 '16 at 19:17

0 Answers0