Hi Isomorphic,
I have Boolean column summary issue on ListGrid grouped and with summaries on group header.
ISSUE 1: Default boolean Icon is shown on group1 and group2, when grid.setGroupByFieldSummaries("group3").
Expected result: Default boolean Icon is NOT shown on group1 and group2
See screenshoot "grid.jpg" marked as 2.
ISSUE 2: Default boolean Icon on group header summary has action (activate/inactivate all group rows)
Expected result: Default boolean Icon on group header summary does action on pressing it (activate/inactivate all group rows)
Is there a way to implement this (when grid.setCollapseGroupOnRowClick(false))?
See screenshoot "grid.jpg" marked as 3.
Business logic to show summary icon for boolean (active/inactive): to show that group3 i.e. "AAA" is active/inactive. Group3 i.e. "AAA" is active, if at least one of its row is active.
Browsers: IE8, IE9, FF and Chrome.
SmartGWT version 5.0p (v10.0p_2014-10-21/Pro Deployment) (tested also on 5.1d (v10.1d_2015-07-27))
GWT-2.6.0
ListGrid:
Datasource (table of Oracle 11g):
ListGridField:
I have Boolean column summary issue on ListGrid grouped and with summaries on group header.
ISSUE 1: Default boolean Icon is shown on group1 and group2, when grid.setGroupByFieldSummaries("group3").
Expected result: Default boolean Icon is NOT shown on group1 and group2
See screenshoot "grid.jpg" marked as 2.
ISSUE 2: Default boolean Icon on group header summary has action (activate/inactivate all group rows)
Expected result: Default boolean Icon on group header summary does action on pressing it (activate/inactivate all group rows)
Is there a way to implement this (when grid.setCollapseGroupOnRowClick(false))?
See screenshoot "grid.jpg" marked as 3.
Business logic to show summary icon for boolean (active/inactive): to show that group3 i.e. "AAA" is active/inactive. Group3 i.e. "AAA" is active, if at least one of its row is active.
Browsers: IE8, IE9, FF and Chrome.
SmartGWT version 5.0p (v10.0p_2014-10-21/Pro Deployment) (tested also on 5.1d (v10.1d_2015-07-27))
GWT-2.6.0
ListGrid:
Code:
grid.setCanSort(false); grid.setCanFreezeFields(false); grid.setCanGroupBy(false); grid.setCanAutoFitFields(false); grid.setCanPickFields(false); grid.setCanReorderFields(false); grid.setAutoFetchData(true); grid.setAlternateRecordStyles(false); grid.setGroupByField("Z_GROUP1","Z_GROUP2","Z_GROUP3"); grid.setShowGridSummary(false); grid.setShowGroupSummary(true); grid.setShowGroupSummaryInHeader(true); grid.setGroupByFieldSummaries("Z_GROUP3"); grid.setShowGroupTitleColumn(false); grid.setGroupTitleField("Z_NAME"); grid.setCollapseGroupOnRowClick(false);
Code:
<field name="Z_ACTIVE" type="boolean" title="Active" sqlStorageStrategy="number"/>
Code:
ListGridField activeField = new ListGridField("Z_ACTIVE", 40); activeField.setAlign(Alignment.CENTER); activeField.setSummaryFunction(new SummaryFunction() { @Override public Object getSummaryValue(Record[] records, ListGridField field) { int sum = 0; for(Record i : records){ sum = Math.max(i.getAttributeAsBoolean("Z_ACTIVE")?1:0, sum); } return sum; } });
Comment