I was using below code to add generated columns to datagrid
for (Fieldsfield : fields) {
dataGrid.addGeneratedColumn(field.getCaption(), row -> {
String value = findDynamicFieldValue(field, row.getItem(), new HashSet<>());
Label label = uiComponents.create(Label.class);
label.setValue(value);
return label;
});
}
I was trying to create labels in the generated columns and trying to set values to the label. This work with table but in datagrid is shows like below. Any solution