I have 2 datagridviews and i want to copy cells from the datagridview1 to datagridview2 (a cell at a time).I´m able to select the cell I want and drag it to the datagridview
The error is in this line:
Point cursorLocation = this.PointToClient(new Point(e.X,e.Y));
Because this. does not refer to the DataGridView, but rather to the Form.
this.
DataGridView
Form
It should be instead:
Point cursorLocation = dataGridView2.PointToClient(new Point(e.X,e.Y));