Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Boolean column summary issue on ListGrid grouped and with summaries on group header.

    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:
    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);
    Datasource (table of Oracle 11g):
    Code:
    <field name="Z_ACTIVE" type="boolean" title="Active" sqlStorageStrategy="number"/>
    ListGridField:
    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;
    	}
    });
    Attached Files

    #2
    Issue 2: yes, you can add an event handler for mouseDown or mouseUp and detect that a particular field was hit with getEventColumn().

    issue 1: we need a minimal, standalone test case that reproduces this issue - partial code isn't enough. We'd suggest starting from a Showcase sample and minimally modifying it as the simplest way to create a test case. Further advice on creating test cases can be found in the FAQ and in the Debugging topic in the reference.

    Comment

    Working...
    X