Have you tried adjusting the width and height of the cell's content?
Anyway, I assume this is a better approach:
Code:
getView().setViewConfig(new GridViewConfig<MODEL>()
{
@Override
public String getRowStyle(MODEL model, int rowIndex)
{
return CSS_STYLE;
}
@Override
public String getColStyle(BankProductOrSegment model,
ValueProvider<? super BankProductOrSegment, ?> valueProvider, int rowIndex, int colIndex)
{
return CSS_STYLE;
}
});
This sets a custom style to a row/column depending on contained object and row/col index. This way you can set the desired background color for the entire cell and not only the contained text. But don't forget to return the css style name and not the style itself (so don't return "background-color: xx" but the corresponding style name defined in your css file). And "!important" may be needed to really color the cell (at least I needed it).