how to query one datasource from table selection

How to query datasource in one table from selection in another table.
I have one table with entities I can access the Collection of related entities from the edit view but would like to show the collection without open the edit screen.

You can implement master-detail relationship between datasources using query parameters as explained here (see parameters with “ds” prefix):
https://doc.cuba-platform.com/manual-6.2/datasource_query_params.html

An example of master-detail datasources can be found here: