I am using SmartGWT and it’s ListGrid. Is it possible to have different ListGridFieldType’s in same ListGridField in SmartGWT? E.g. having both ListGridFieldType.FLOAT and ListGridFieldType.IMAGE for the same column? The background to my question is that the column should present values that are Doubles, but in case the Double is null an image should be displayed.
I am using SmartGWT and it’s ListGrid. Is it possible to have different ListGridFieldType’s
Share
Use ListGridField.setCellFormatter to create this conditional display.
http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/widgets/grid/ListGridField.html#setCellFormatter%28com.smartgwt.client.widgets.grid.CellFormatter%29
In this case leave the field type as FLOAT since the values are either numeric or null – there’s no actual image URLs in the data, it’s just something you do in your formatter.