Grid A : Student Entity
Grid B : MyClass Entity
1. I'm wondering how to insert multiple rows selected (checkboxed) from the Student entity into the MyClass entity at once when a button is clicked.
2. I'm wondering how to move multiple rows selected (checkboxed) from the Student entity into the MyClass entity at once when a button is clicked.
Hi,
You can use API_Selection\GetSelectedRowsData to retrieve all selected rows from Grid A.Then, iterate over the result using a ForEach. Inside the loop, deserialize each item using JSONDeserialize with the same data type as the list bound to your grid.
For each deserialized entry, call API_Rows\AddNewRows to create a new row, and then use API_Data\SetCellData to populate the required columns.
I also attached a sample OML you can check for refernece.
Note that this solution is client side, so the data won't actually be saved, just copied from grid A to grid B.
Thank you for your kindness.
Is it possible to display an edit indicator on the left side of a row when working with grids?
For example, if I edit data, it's a 'U'.
If I delete a row, it's a 'D'.
When I use RemoveSelectedRows to delete a row, it's deleted immediately.
I want to check the status of the operation in Flow when I press the Save button, and then perform the add/edit/delete operations.
I believe at this stage you store the class id somewhere.
There are 2 approaches to achieve this:
Hope this help
hello @TravelerAutumn ,
Both scenarios follow the same pattern using the OutSystems Data Grid selection. 1) Insert multiple selected rows Enable row selection (checkboxes) on Grid A (Student). On button click, use the grid’s SelectedRows output. Loop through the selected records and Create records in the MyClass entity for each student. 2) Move multiple selected rows First, insert them into MyClass as above. Then, in the same loop (or after), Delete or mark those Student records as moved. This approach handles bulk actions cleanly and works well for larger datasets.