Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Vaadin Grid
Hi,
I would like to ask if it is possible to use some kind of rendered for specific column in Grid.
public class MyClass{
String calculatedValue;
String value;
}
...
Grid grid = new Grid(); itemBeanItemContainer = new BeanItemContainer<>(MyClass.class, items);
grid.setContainerDataSource(itemBeanItemContainer);g
grid.removeColumn("calculatedValue");
When rendering grid i want to display calculatedValue in column, but when entering edit mode, i would like to see calculatedValue.
What is the best way to solve this problem?
I am using Vaadin 7.7.7
EDIT:
In Vaadin 8.0.0 i was able to achieve this
TextField valueTextField = new TextField();
Binder<MyClass> binder = grid.getEditor().getBinder();
doneBinding = binder.bind(valueTextField, MyClass::getValue, MyClass::setValue);
Grid.Column<MyClass, String> calculatedValue = grid.addColumn(MyClass::getCalculatedValue);
calculatedValue.setCaption("Calculated value");
calculatedValue.setEditorBinding(doneBinding);
But in Vaadin 7.7.7 I havent found way how to specify what I want to bind TextField
I found a way how to do something similuar in Vaadin 7.7.7
Grid grid = new Grid();
itemBeanItemContainer = new BeanItemContainer<>(MyClass.class, items);
grid.setContainerDataSource(itemBeanItemContainer);
grid.removeColumn("value");
TextField valueEditor = new TextField();
Grid.Column valueColumn= grid.getColumn("calculatedValue");
valueColumn.setEditorField(valueEditor);
FieldGroup editorFieldGroup = grid.getEditorFieldGroup();
editorFieldGroup.bind(valueColumn, "value");
grid.setEditorEnabled(true);
grid.setEditorBuffered(false);
But unfortunately it doesn't work as expected. When the grid is rendered I can see correctly calculatedValue When i want to edit some value it still works. I can see value, but after saving this row (pressing ENTER in unbuffered mode), and going to check real value, (entering edit mode) i see that empty string is set instead of value I filled.