Reputation: 339472
In Vaadin 8.1, the Grid
API doc shows that we can pass a renderer as part of the column definition when calling addColumn
. But I do not see any setter methods for changing the renderer.
Is there any way to change the renderer on a column in the Grid object?
Upvotes: 0
Views: 1636
Reputation: 339472
Column
rather than Grid
Call setRenderer
on the column rather than the grid.
The column is represented by a class nested inside the grid class, Grid.Column
. Pass a column ID to retrieve the particular column.
myGrid.getColumn( someColumnId )
There you call setRenderer
.
myGrid.getColumn( someColumnId ).setRenderer( myRenderer ) ;
Replacing the renderer is shown in the Vaadin Framework guide, Grid page, section Column Renderers.
Upvotes: 1