Grid. How to make cell's content to be a link to external page in vaadin 13

Hi ,
I’m trying to customize Grid’s cells an make them to be links to external pages. I did not found any working example of it.
Please help.

The most obvious method that comes to my mind is to use addComponentColumn (or addColumn with ComponentRenderer) using Anchor as component.

Thanks. I tried it but didn’t succeed to create dynamic links based on grid’s data. Do you have an example code?

It should be something like this (replace item.getUrl() with the actual getter of the link you have in your bean)

grid.addColumn(new ComponentRenderer<Checkbox,MonthlyExpense>(item ->  {
    Anchor anchor = new Anchor();
	anchor.setHref(item.getUrl);
	return anchor;
})).setHeader("Link");