PDA

View Full Version : GroupingView (w/scrollbar) doesn't render group correctly beyond visible window area



nbuesing
8 Feb 2012, 10:08 AM
If you create a grouping view for a grid, and enable the grouping display, the group is not rendered for the region that you have to scroll to (see screenshot).

I provide a patch file against your explorer code to reproduce. I changed entry point to go straight to this example, since explorer framework was making it difficult for me to create a scrolling grid.

Once pages loads, expand the "Change Column" as far as you can. Then expand the "Price" Column, this will force the scroll bar to render.

31497



Index: src/main/java/com/sencha/gxt/explorer/Explorer.gwt.xml
===================================================================
--- src/main/java/com/sencha/gxt/explorer/Explorer.gwt.xml (revision 2134)
+++ src/main/java/com/sencha/gxt/explorer/Explorer.gwt.xml (working copy)
@@ -12,7 +12,7 @@

<!-- <set-property name="gxt.logging.enabled" value="true" /> -->

- <inherits name="com.sencha.gwt.uibinder.UiBinder" />
+ <!-- <inherits name="com.sencha.gwt.uibinder.UiBinder" /> -->

<!-- Specify the paths for translatable code -->
<source path='client' />
@@ -31,5 +31,6 @@

<set-configuration-property name="GXT.state.autoBeanFactory" value="com.sencha.gxt.explorer.client.misc.WindowStateExample.ExampleAutoBeanFactory" />

- <entry-point class='com.sencha.gxt.explorer.client.Explorer' />
+ <!-- <entry-point class='com.sencha.gxt.explorer.client.Explorer' /> -->
+ <entry-point class='com.sencha.gxt.explorer.client.grid.GroupingGridExample'/>
</module>
Index: src/main/java/com/sencha/gxt/explorer/client/grid/GroupingGridExample.java
===================================================================
--- src/main/java/com/sencha/gxt/explorer/client/grid/GroupingGridExample.java (revision 2134)
+++ src/main/java/com/sencha/gxt/explorer/client/grid/GroupingGridExample.java (working copy)
@@ -21,12 +21,13 @@
import com.sencha.gxt.examples.resources.client.model.Stock;
import com.sencha.gxt.explorer.client.model.Example.Detail;
import com.sencha.gxt.widget.core.client.ContentPanel;
+import com.sencha.gxt.widget.core.client.container.Viewport;
import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
import com.sencha.gxt.widget.core.client.grid.ColumnModel;
import com.sencha.gxt.widget.core.client.grid.Grid;
import com.sencha.gxt.widget.core.client.grid.GroupingView;

-@Detail(name = "Grouping Grid", icon = "grouping", category = "Grid", classes = {Stock.class})
+@Detail(name = "Grouping Grid", icon = "grouping", category = "Grid", classes = {Stock.class}, fit=true)
public class GroupingGridExample implements EntryPoint, IsWidget {

interface StockProperties extends PropertyAccess<Stock> {
@@ -75,7 +76,7 @@

final GroupingView<Stock> view = new GroupingView<Stock>();
view.setShowGroupedColumn(false);
- view.setForceFit(true);
+ // view.setForceFit(true);

Grid<Stock> grid = new Grid<Stock>(store, cm);
grid.setView(view);
@@ -97,7 +98,9 @@

@Override
public void onModuleLoad() {
- RootPanel.get().add(this);
+ Viewport vp = new Viewport();
+ vp.setWidget(this);
+ RootPanel.get().add(vp);
}

}