I could do this in Vaadin 8 using ItemClickListener on a Grid. In 10+ it looks like we now use ItemClickEvent.getColumn, but now I see no equivalent method in ItemClickEvent. I can get the row, but not the column. Any ideas, or a workaround?
I need a mechanism to edit a parameter that is associated with each cell, stored in the dataprovider object, but not the one displayed in that cell.
I am using 14-beta2, so I can potentially use a custom editor for this if I can figure out how. I need to initialize the value in the editor component to something other then the cell value to make it work properly.
// Using a native input as the editor field for the column
Input customInput = new Input();
grid.addEditColumn(Calculation::getValue)
.custom(customInput, (item, newValue) -> item.setSecondaryValue(newValue))
.setHeader("Value")
.setWidth("300px");
Some of us feel much more comfortable with java than with the various client side technologies.
In 14.0 I was able to include a Polymer button in the grid, but the look is not appealing.
Client technologies tend to vary more over time than the java technology.
I look forward to Vaadin 14.1!
Some of us feel much more comfortable with java than with the various client side technologies.
In 14.0 I was able to include a Polymer button in the grid, but the look is not appealing.
Client technologies tend to vary more over time than the java technology.
I look forward to Vaadin 14.1!
Do you know if this was addressed in 14.1? The link doesn’t appear to go directly to an issue.
I forgot about this issue.
In 14.1 the standard Grid takes an ItemClickListener with an ItemClickEvent.
This event holds among other things the column:
I forgot about this issue.
In 14.1 the standard Grid takes an ItemClickListener with an ItemClickEvent.
This event holds among other things the column:
Great thank you, that is exactly what we were looking for. To expand on this, it would be nice if the same event.getColumn were available inside a GridContextMenu listener as well.