SmartGWT 2.5
We have a ListGrid where we have overridden getCellHoverComponent() to show another ListGrid with "child" records. The class that contains the main ListGrid is used in two different contexts. One is in a SectionStackSection and another is in a Window. The hover grid shows up just fine in both cases.
The users have asked for a summary line to be added to the hover grid. So we added grid.setShowGridSummary(true). The summary line now shows up as expected in the first context, but not in the second.
Is there some other setting that could possibly make the summary row not show? Here is the code that setup up the hover grid.
We have a ListGrid where we have overridden getCellHoverComponent() to show another ListGrid with "child" records. The class that contains the main ListGrid is used in two different contexts. One is in a SectionStackSection and another is in a Window. The hover grid shows up just fine in both cases.
The users have asked for a summary line to be added to the hover grid. So we added grid.setShowGridSummary(true). The summary line now shows up as expected in the first context, but not in the second.
Is there some other setting that could possibly make the summary row not show? Here is the code that setup up the hover grid.
Code:
@Override protected Canvas getCellHoverComponent(Record record, Integer rowNum, Integer colNum) { RecordList packContents = record.getAttributeAsRecordList(PACK_CONTENTS);; if (packContents!=null && !packContents.isEmpty()) return getPackGrid(packContents); else return null; } /** * Returns a canvas to display as hover text for a prepack item. * @param packContents A RecordList of PoPackContents records to display * @return */ private Canvas getPackGrid(RecordList packContents) { ListGrid grid = new ListGrid(); grid.setDataSource(DataSource.get(IslandPacificDSConstants.DATASOURCE_PoPackContents)); grid.setFields(getPackGridFields(DataSource.get(IslandPacificDSConstants.DATASOURCE_PoPackContents).getFields())); grid.setShowGridSummary(true); grid.setData(packContents); grid.setAutoFitData(Autofit.BOTH); grid.setAutoFitFieldWidths(true); grid.setLeaveScrollbarGap(false); grid.setAutoFitWidthApproach(AutoFitWidthApproach.BOTH); return grid; };
Comment