Hi @rene,
Usually related data are exposed as sub properties that can be expanded. For example Customer-> Orders from Northwind database:
If there is no relationship you can perform a database call to get additional data using row data item.
A) To do this you can use pure no-code style approach with a CustomComponent to perform the database call on load:
-
Create a page with no navigation that will server as component, perform database call on Load with the following filter and set the result to a property bound to heading Text:
-
Add additional column to the DataGrid, define CustomComponent in the column Template and use the page from previous step as source. CustomerID is set as attribute:
-
Run the application:
B) You can perform database call using a custom method defined in the page partial class:
-
Define custom method:
-
Execute the method when needed - in my case in column template:
-
Run the application:
You can get the application illustrating all three approaches from here:
https://drive.google.com/file/d/19tlxXZbMbjck55AVMsMaOcxTS9nucXwz/view?usp=sharing
- I'm my example I'm returning Count() of the detail records however you can extend it to return data and bind desired component to that data.