So, you can try this way:
Assuming your products have a unique ID, I suggest using a column of type CheckBox in the DataGridView. Use the DataGrid "Cell Content Click" event to verify that the column you clicked was the check box (e.ColumnIndex == 0), where 'e' is the DataGridViewCellEventArgs of the event. If it is, assign the value 1 to it (dataGridViewMovimentos.CurrentRow.Cells [0] .Value = 1;).
(Somethingsthere,likethevalue,areusedinmyprogram,soyoucanignoreit.)Theimageisforreferenceonly,theimportantpartisifsandthecellvaluechange.
Next,addtothebuttonclickeventtheroutinebelowtocheckallrows,andwhenyoufindacheckBoxwithavalueof1,copythatrowtotheothercolumn(IsuggestusingtheproductIDinthelastpositionofthetable,withthepropertyvisible=false).
(You have to make the newRow.Cells [position] .value for each cell you want to transfer and remove it for those you want to remove. Remember that your target dataGrid must have exactly the same columns as the row you are returning Then remove it where you need it.)
Try to do it that way there. I tested it here and it worked.
I ask someone to format this text. I'm new here, so I could not format it.
Other questions, contact me and I'll try to help you. I'm at work now, but I'll answer you as soon as I can.
Q: This is my screen with the CheckBox at the beginning: