once you have added the style class name, like in the above linked example, take a look at your app in Chrome dev tools or similar and find the class name on your Grid. Start tweaking with styles until you find the correct element you want to hide. You could start with something like
.myclassname {
display: none;
}
and add more specific rules until you hit the Button element you want.
I appreciate the help and will be using it. That said my main issue is how to code implementing a different style based on data present in the column and not on a click event. In the below example I’m only dealing with click events that happen
after the button is clicked.
So:
gridMain.addColumn(
//Somewhere in here I'm having issues trying to code the
//different .addStyleName("XXXXX") formatting based on data.
item -> "Column_header",
new ButtonRenderer(
clickEvent -> {
if(((Item)clickEvent.getItem()).getAvailableCases() > 0) {
//Whatever Action
}
})
).setCaption("WHATEVER");
gridMain.setStyleGenerator((item -> {
if ( item.getAvailableCases() > 0 ) {
return "v-grid1";
} else {
return "v-grid2";
}
}));
Then I just modified the Css this way for the v-grid2 class:
.v-nativebutton{
display: none;
}
Works perfectly, thanks for your help!