[Data Grid Reactive] How to Duplicate Data Grid Reactive Rows
Forge component by OutSystems R&D
Application Type
Reactive

How would I duplicate a current data grid row?

There is a "AddNewRows" Client Action in DataGridReactive, but is there a way to duplicate an existing row?


Thanks!

Solution

Hello @Zach Geltmacher ,

We believe this is achievable using Data Grid components:

Using the Menu Item Custom Option it is possible to get the data from the selected row, create a new one and set that data in the right columns:

Using this, you'll be able to achieve this:


In attachment, you can find a sample OML with this implementation.

Please keep in mind that this hasn't been tested for all possible use cases or that it cover all of your requirements, so we cannot assure that it will work for all use cases.

Please let us know if this helps.

Bruno Martinho

CopyRow.oml

Hello Zach,

I hope you are great mate.

You can right click on grid and copy it then paste over there. Unless you can add an empty row there after clicking on insert blank row.

Make a nice day!!

Kind Regards,

Ajit kurane.

I hope you're doing well too! Thanks for the info! 

This will work, but I'm wanting something a little easier for our users. Like to tie an action to a button that will copy the selected rows into a new row, duplicating that row in just one click.

Instead of having to:

1. Copy existing row

2. Add row

3. Paste row


Is this possible?


Starting with this:

Then one click of a button and getting this:


Solution

Hello @Zach Geltmacher ,

We believe this is achievable using Data Grid components:

Using the Menu Item Custom Option it is possible to get the data from the selected row, create a new one and set that data in the right columns:

Using this, you'll be able to achieve this:


In attachment, you can find a sample OML with this implementation.

Please keep in mind that this hasn't been tested for all possible use cases or that it cover all of your requirements, so we cannot assure that it will work for all use cases.

Please let us know if this helps.

Bruno Martinho

CopyRow.oml

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