[Data Grid Web] Paste now pastes in incorrect order (2.14.1)
Question
Forge component by OutSystems R&D

Using the latest version of the component, when I Ctrl-C to copy several rows of data, once I hit CTRL-V to paste the data back in, the data copies into the grid in the opposite order.

I copy these cells:

1

2

3

4


They paste back in this order

4

3

2

1



Hello Coy Kissee,

Thanks for bringing this subject to the discussion.

The DataGrid team has been analyzing this topic and we believe we will have the solution for this issue on our next release. We are now making sure everything is going to run as expected.
It should be fixed in early August, you can expect it on our next release.

Tiago Pereira

@Tiago Miguel Pereira ,

We are on the latest version now, and getting strange results.  When I (CTRL-C) copy the highlighted cells:

And then (CTRL-V) paste into Excel:

The pasted values start two rows below what I selected to copy.  On this screen I have the grid grouped by two columns to give two sets of total rows.

Thanks,

Coy Kissee

Hello @Coy Kissee,

I wasn't able to replicate the issue you mentioned. Could you please provide us a sample or an image showing the problem?

Best regards,

Tiago Pereira


@Tiago Miguel Pereira 

The images above shows the issue - when I copy rows 1-5 it pastes rows 3-7.  I have confirmed that if I remove the group rows, the copy/paste works appropriately, but as I add group rows, the copy/paste skips rows from the top of the copy and adds to the bottom.

Ricardo Valim has a copy of our OML, which he is supposed to be looking at on another issue.  I cannot share the OML publicly, but this example is on the ViewActualsScreen.

Thanks,

Coy Kissee

Hello @Coy Kissee,

I identified the problem and it seems that it is an issue associated with the copy feature when there is at least one column inside the group panel. Regarding your specific use case, I think we have a solution but bear in mind that we didn't make all the necessary tests to ensure that it will work on all cases.

----------------------------------------

Right now, I would suggest the following workaround (.oml attached to the reply)



Inside the .oml you will find a JS block containing a new code that will override the method GridOS.ContextMenuFeature._copy.


You will find 2 Web Screens inside the .oml, because the override of this method needed a few validations for HasPagination set both to True and False.


Hope this answer is useful.

Best regards,

Tiago Pereira

DataGridCopy.oml

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.