-3

In the subpage, I have a grid with rows and a "Add to form" button. If the "Add to form" button is triggered, all selected rows will be reflected also on the grid in the main page. What would be the approach in this situation?

I expect that the rows will be reflected

Pat
  • 1

1 Answers1

0

What about creating a peoplecode class that encapsulates the rowset of the grid on the main page?

You make a component variable of it and instantiate it both on your main component (for initialization) and on the secondary page, that class can have a method like "AppendSelectedRows" that takes a rowset object as a parameter (in this case, your secondary page one) then iterates over each of the rows checking if they are selected, if so then insert then to the main rowset.

This is assuming they both use the same records, or at least the same fields, since there are methods on the record can help you copy those values.