This example shows how to load data on demand when you have a Hierarchy Grid - the DetailTemplate
contents will be loaded every time the corresponding template is expanded.
Key points of implementation:
-
Setup a Grid with DetailTemplate.
-
In another file, create a component that you want to be nested inside the
DetailTemplate
. It will contain the desired components (like the nested grid, or any other data representation you need). -
Use the context of the grid
DetailTemplate
to pass a[Parameter]
to the child component that identifies the parent record. -
In the
OnParametersSetAsync
lifecycle method of the child component, pass that ID to the service which loads the data for the component.