Enabling Expanding Rows - full example

I have tried both TemplateRenderer or a ComponentRenderer to define how the details are rendered.
Unfortunately in both cases I have failed with different problems.
Where to see the full code example, demonstrating “Enabling Expanding Rows” ?

hi,

https://vaadin.com/components/vaadin-grid/java-examples/item-details

simply use grid.setItemDetailsRenderer(new ComponentRenderer<>(this::“a method which returns a component”)) or grid.setItemDetailsRenderer(new TextRenderer<>(this::“a method which returns a string”))