Rendering visual components in DataGrid

Hello,

I was wondering if it is possible to render multiple embedded visual components in a DataGrid cell, as can be done in a Table.
(E.g. as is done in timesheets example in the weeky timesheet screen, initDaysColumns method
sample-timesheets/SimpleWeeklyTimesheets.java at master · cuba-platform/sample-timesheets · GitHub )

It seems to be somewhat more complex… can it be done using HtmlRenderer?
I would go with a Table, but wanted to use the fixed column feature of DataGrid at the same time…

Thanks for any hints.

Hello,

One of the differences to Table is that DataGrid doesn’t allow to add server-side components to cells. Instead, the much more efficient renderers can be used for the most common cases.

For example, take a look at Vaadin’s com.vaadin.ui.renderers.ProgressBarRenderer that represents a double value as a graphical progress bar. And CUBA Platform’s com.haulmont.cuba.web.gui.components.renderers.WebProgressBarRenderer that wraps Vaadin renderer and can be set for DataGrid.Column.

Regards,

Gleb

Hi Gleb,

Thank you for confirming!
Best regards,

Matthis