Announcement

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

    ListGrid gridSummary plus ListGridField addSummaryFunction shows extra blank summary

    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
    . Click image for larger version

Name:	1-28-2016 11-00-08 AM.png
Views:	57
Size:	5.5 KB
ID:	234526



    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;
    	}
    }
    Last edited by justindthomas; 28 Jan 2016, 09:07.

    #2
    We believe this issue has already been resolved (though this thread was not updated when the fix was applied).
    Please try the latest nightly build. If the issue does persist for you, let us know and we'll revisit it.

    Thanks
    Isomorphic Software

    Comment

    Working...
    X