Hello,
You can achieve this by using, Microflow as data source fro DataGrid. Since SalesOrderHeaders is the page parameter that means for your DS Microflow SalesOrderHeaders will also be the current object . Now you can retrieve All the salesOrderDetails from DB and add xpath constraints like SOnumber = $SalesOrderHeaders/SOnumber.
You can then return this list to DataGrid.
Hope this helps
Cheers