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!
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
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:
is it possible that it doesn't work?
Hey Bruno Martinho
I notice in the offered solution you go from GetSelectedRowsData directly to a JSONDeserialize (though the IF). I am trying the same thing and I cannot get it to work. Could you show me the settings for the JSONDeserialize? Specifically the JSON string.
I downloaded your .OML file and you have the same JSON string I am using, but it does not work. That JSON string does not return to me a row. Any help is greatly appreciated.
Got it figured out. https://www.outsystems.com/forums/discussion/80217/outsystems-data-grid-looking-for-a-for-each-example-that-uses-getselectedrowsda/ for the details.