Expected results: the code below should show exactly one group summary row with the values "custom name summary" and "custom value summary".
Actual results: there are two group summary rows. The top one is blank, the second one is the expected row
.
smart gwt version : 10.1p_2016-01-14/Enterprise Deployment (built 2016-01-14)
browser: IE, version 11
client side problem
standalone test case:
Actual results: there are two group summary rows. The top one is blank, the second one is the expected row
.
smart gwt version : 10.1p_2016-01-14/Enterprise Deployment (built 2016-01-14)
browser: IE, version 11
client side problem
standalone test case:
Code:
public class ExtraGridSummary implements EntryPoint
{
public void onModuleLoad()
{
final ListGrid grid = new ListGrid();
grid.setWidth(500);
grid.setHeight(200);
grid.setShowGridSummary(true);
// ------ build fields ----------------------
ListGridField[] fields = new ListGridField[2];
fields[0] = new ListGridField("name");
fields[0].setType(ListGridFieldType.TEXT);
fields[0].addSummaryFunction(new SummaryFunction()
{
public Object getSummaryValue(Record[] records, ListGridField field)
{
return "custom name summary";
}
});
fields[1] = new ListGridField("value");
fields[1].setType(ListGridFieldType.FLOAT);
fields[1].addSummaryFunction(new SummaryFunction()
{
public Object getSummaryValue(Record[] records, ListGridField field)
{
return "custom value summary";
}
});
grid.setFields(fields);
// ------ build data ------------------------
Record[] data = new Record[3];
data[0] = record("Alice", 100);
data[1] = record("Bob", 200);
data[2] = record("Cheryl", 300);
grid.setData(data);
// ----------- render ---------------------
grid.draw();
}
private Record record(String name, double value)
{
Record record = new Record();
record.setAttribute("name", name);
record.setAttribute("value", value);
return record;
}
}
Comment