Threaded View
-
2 Mar 2012 12:41 PM #1
Live GroupSummary Grid Collapse All Groups Does not always work
Live GroupSummary Grid Collapse All Groups Does not always work
At one point the collapseAllGroups method of the GroupSummaryView class worked but after some code updates it no longer works. I am not sure if this is related to the Beta3 updates or whether it has always not worked in certain situations. Here is my code:
Anyone else see this problem?Code:public Widget asWidget() { colModel = new ColumnModel<Item>(this.getColList()); store = new ListStore<Item>(props.key()); HtmlTemplate.MainPageLayout templates = GWT.create(HtmlTemplate.MainPageLayout.class); HtmlLayoutContainer htmlCon = new HtmlLayoutContainer(templates.getTemplate()); innerHtmlCon = new HtmlLayoutContainer("<div class=\"gridHolder\"></div>"); htmlCon.add(innerHtmlCon, new HtmlData(".pageContent")); return htmlCon; } public void setData(ArrayList<Item> data) { summary = new GroupSummaryView<Item>(); summary.setForceFit(true); summary.setShowGroupedColumn(false); // Fill the list store with the data store.addAll(data); // Set the sort info so that it sorts by lastIngestedTime store.addSortInfo(new StoreSortInfo<Item>(props.lastIngestedTime(), SortDir.DESC)); store.applySort(true); grid = new Grid<Item>( store, colModel); grid.setBorders(true); grid.setView(summary); grid.getView().setShowDirtyCells(false); grid.setHeight(CommonConstants.GRID_HEIGHT); StringFilter<Item> shortNameFilter = new StringFilter<Item>(props.productShortName()); DateFilter<Item> lastIngestedFilter = new DateFilter<Item>(props.lastIngestedTime()); DateFilter<Item> lastObservedFilter = new DateFilter<Item>(props.lastObsTime()); filters = new GridFilters<Item>(); filters.initPlugin(grid); filters.setLocal(true); filters.addFilter(shortNameFilter); filters.addFilter(lastIngestedFilter); filters.addFilter(lastObservedFilter); Scheduler.get().scheduleFinally(new ScheduledCommand() { @Override public void execute() { summary.groupBy(datasource); } }); summary.collapseAllGroups(); innerHtmlCon.add(grid, new HtmlData(".gridHolder")); }
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote