Grid and rendering of cells

I have a Grid which have a column of Doubles and I use a renderer to present doubles with two decimals.

grid.addColumn(“value”, Double.class);

grid.getColumn(“value”).setRenderer(new NumberRenderer(new DecimalFormat(“#0.00”)));

But for some rows in the Grid I may need to display the double with four decimals.
Seems like the renderer doesnt have a clue of which row it shall render.

Any ideas on how to solve this?

I’m years late to be of any use to this question (apologies for the delay!), but in case anyone is still wondering if this is possible – yes, you should be able accomplish this without too much trouble by extending the client-side and overriding the
method of the widget.

However, a word of caution: if I recall correctly,
is triggered before state change! The up-to-date state is already available at that time but connector hasn’t pushed it to the widget yet, so you’ll need to give the widget a way to query any required state data directly from the connector.

As an example of a row-specific renderer, you can take a look at my old
implementation, although that one does quite a bit more complicated things than check which formatter to use.