Hey there,
in general it is not possible, because the datagrid sees your parent entity as 1 entity with multiple associated objects, in other words: there is only 1 object in the database to show.
What you could do is one of the following:
OPTION 1
- Use a datasource microflow to retrieve the list of your parent entity
- Loop over the list of parent entity
- Retrieve the list of associated entity
- Loop over the associated entity
- create an non persistent object for every associated entity in combination with the parent
- The result would be a list of non persistent entities with an association to a parent and a child
- if you have 1 parent with 6 childs, you would get 6 non persistents with all a link to the parent and the specific child
OPTION 2
- Use a list view instead of a datagrid and nest a listview within the listview
- Place a listview for the parent
- Place a layout grid within the listview with 1 column for the name of the parent and a column for the associated children
- Place a listview in the second column and retrieve the associated children
- This will give you a list instead of a row, which will make the overall UX better
PS: you could also perform the second option with the DATAGRID 2 by having a custom content column which would contain another datagrid 2 for the associated children