Hello,
in the Table component there is a multiline option, in DataGrid not. How can I implement this in DataGrid?
Greetings
Andreas
PS: I am using CUBA Platform 7.1.2
Hello,
in the Table component there is a multiline option, in DataGrid not. How can I implement this in DataGrid?
Greetings
Andreas
PS: I am using CUBA Platform 7.1.2
Hello @Andreas.Brueck
I suggest you to use DataGrid renderers feature: documentation.
In your case HtmlRenderer
or ComponentRenderer
seem to be suitable.
Regards
Hello,
thank you for your answer. I tried the HtmlRenderer
final DataGrid.Column<PreviousAudit> resultColumn = previousAuditsTable.getColumnNN("result");
resultColumn.setRenderer(previousAuditsTable.createRenderer(DataGrid.HtmlRenderer.class), o -> o instanceof String
? ((String) o).replaceAll("(\r\n|\n)", "<br />")
: null);
But this, didn’t work:
Do you have an example?
Greetings
Andreas
Hello @Andreas.Brueck
I’ve investigated the case and concluded that there is no ability to be able to show multi-line component or content in DataGrid
due to internal component mechanisms.
As an option you can use DataGrid row details feature (documentation) or use PopupView component to show some preview and be able to show the full content.
Regards,
Daniil
Thank you very much, sir. It would be nice if this would be available in one of the next versions.
Greetings
Andreas
Unfortunately I can’t promise anything