Setting grid renderer gives error in Eclipse

I am trying to set a renderer on a grid column with a Date type:

grid.getColumn(“created”).setRenderer(new DateRenderer(Constants.SHORT_DATE_FORMAT));

but in Eclipse I get the following compile warning:

The method setRenderer(Renderer<? super capture#1-of ?>) in the type Grid.Column<Issued,capture#1-of ?> is not applicable for the arguments (DateRenderer)

Any way around this?

Thanks, that fixed it.

You can just use class cast

((Column<GRID_BEAN_TYPE, Date>)grid.getColumn("created")).setRenderer(new DateRenderer(Constants.SHORT_DATE_FORMAT));

Hi Haijian,

I was also tying to have a HtmlRenderer, and Eclipse was giving error. After casting, it started working. thanks a lot