Grid - dynamic components rendererer


  1. Is it possible to use ButtonRenderer<> in Grid dynamically? What I want to generate button conditionally (so it will not exists in every cell, but will appear in some cells), but I have no idea how to accomplish that.
  2. Using mentioned ButtonRenderer is it possible for button to looks like ValoTheme.BUTTON_LINK?

I am using the newest version (v8.0.3).

This is not possible with regular ButtonRenderer, but it should be possible to extend in and my your custom ButtonRenderer with added logic to determine whether to show it or not. Especially if you make this application specific, so that you know the property names of the columns etc.

Thanks for your response. I have made workaround for this by using css to hide buttons (also changing them to link style). If anyone would be interested:

in css file (mytheme.scss) :

@mixin { > .v-nativebutton {
         @include valo-button-borderless-style;
         @include valo-link-style;

.v-grid-cell.hidden > .v-nativebutton {
   display: none;

and in Java code:

grid.getColumn("id").setStyleGenerator(g -> showLink ? "link-button" : "hidden");