Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67497

Add Renderer to Vaadin Grid

$
0
0

I migrating a Vaadin 8 project to Vaadin 14 and i try to show HTML in a grid column. I figured out, that i have to use a TemplateRenderer, but how can i use it?

Here is the code from Vaadin 8:

grid.addColumn(e -> {
    return ((Data) e).getValues()[index];
}).setCaption(myCaption).setRenderer(new HtmlRenderer());

In Vaadin 14 i did this:

gird.addColumn(e -> {
    return TemplateRenderer.<Data>of((String) e.getValues()[index])
}).setHeader(myCaption);

e.getValues()[index] includes HTML, for example: <FONT SIZE = 4 COLOR = BLACK> &#9899;</FONT>

In Vaadin 14 it always returns com.vaadin.flow.data.renderer.


Viewing all articles
Browse latest Browse all 67497

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>