Hi,
Have a listGrid with grouping and summary on the group and on the grid. While editing cells, Grid summary gets refreshed but Group summary not always.
I did my homework, here follows a simple test case for you to reproduce:
In the figure, after changing first row value from 5 to 10, and pressing TAB to edit next record, grid total is changed from 15 to 20, but group (Group 1) total remains at 10 while it should update to 15. One has to click outside the component to get group total updated. Actually events that make Grid Total to update seem to be not the same as events for Group Total updating.
This is just a test case, in my own case the grid is quite more complex and the problem much more annoying.
SGWT Pro 2014-08-31 - Firefox
Thanks, Ben.
Have a listGrid with grouping and summary on the group and on the grid. While editing cells, Grid summary gets refreshed but Group summary not always.
I did my homework, here follows a simple test case for you to reproduce:
Code:
public class Sgwtdebug implements EntryPoint {
public void onModuleLoad() {
Canvas canvas = new Canvas();
canvas.setWidth(300);
canvas.setHeight(200);
final ListGrid grid = new ListGrid();
grid.setWidth100();
grid.setHeight100();
grid.setCanEdit(true);
grid.setGroupStartOpen(GroupStartOpen.ALL);
ListGridField field0 = new ListGridField("name", "Name");
ListGridField field1 = new ListGridField("number", "Number");
field1.setType(ListGridFieldType.INTEGER);
ListGridField field2 = new ListGridField("group", "Group");
field2.setHidden(true);
grid.setFields(field0,field1,field2);
RecordList records = new RecordList();
Record r1 = new Record();
r1.setAttribute("name","Name 1");
r1.setAttribute("group","Group 1");
r1.setAttribute("number",5);
Record r2 = new Record();
r2.setAttribute("name","Name 2");
r2.setAttribute("group","Group 1");
r2.setAttribute("number",5);
Record r3 = new Record();
r3.setAttribute("name","Name 3");
r3.setAttribute("group","Group 2");
r3.setAttribute("number",5);
records.add(r1);
records.add(r2);
records.add(r3);
grid.setData(records);
grid.setGroupByField("group");
grid.setShowGroupSummary(true);
grid.setShowGridSummary(true);
grid.setShowGroupSummaryInHeader(true);
grid.setGroupTitleField("name");
canvas.addChild(grid);
canvas.draw();
}
}
In the figure, after changing first row value from 5 to 10, and pressing TAB to edit next record, grid total is changed from 15 to 20, but group (Group 1) total remains at 10 while it should update to 15. One has to click outside the component to get group total updated. Actually events that make Grid Total to update seem to be not the same as events for Group Total updating.
This is just a test case, in my own case the grid is quite more complex and the problem much more annoying.
SGWT Pro 2014-08-31 - Firefox
Thanks, Ben.