SmartGWT 4.0-2013-11-30
FF 19

When creating a ListGridField with a CellFormatter and a SummaryFunction, the CellFormatter is invoked for all cells and, at the end, for the group cell. I am observing the following:
1. The CellFormatter.format () value parameter contains the HTML returned by the SummaryFunction - seems reasonable
2. On the group cell call, rowNum is 0, and colNum is 6 (in my case). This does not seem reasonable because I cannot tell whether the invocation is for row 0 or the group row.

So I looked around and it seems that the showcase code handles the same problem with a try/catch:

Sample code:

        ListGridField unitPriceField = new ListGridField("unitPrice");
        unitPriceField.setCellFormatter(new CellFormatter() {
            public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
                if (value == null) return null;
                try {
                    NumberFormat nf = NumberFormat.getFormat("#,##0.00");
                    return "$" + nf.format(((Number) value).doubleValue());
                } catch (Exception e) {
                    return value.toString();
1. Is there a way to handle this cleanly, other than a try/catch?
2. When CellFormatter.format () is invoked for the group cell call, is there a way to know that it is a group cell and not a regular cell?