View Full Version : Ext GWT 3.0 Beta 4 and Grid issues

6 Mar 2012, 5:38 AM
I upgraded to beta 4 from 3 yesterday, as per previous upgrades everything went smoothly. However, i noticed a number of issues with the grids. I have grids with expanded columns, which nest another grid (btw this should be an inbuilt feature). The expand buttons disappear on expansion, so i cannot see the 'minus' icon.

If i have several rows and i select a row before an expanded item, it works fine. but if i select an item after the expanded row, it selects the one above it. So if i have 5 expanded items above the item i select, the row 5 items before the one i select is selected.

Also i notices that the performance was terrible, it almost seems like the code has regressed. I understand that the appearance pattern was applied to the grids, but they didn't look as sharp.

As of now i reverted back to Beta 3 but it doesn't inspire confidence.

6 Mar 2012, 9:32 AM
Can you post some sample code that shows how you are nesting the grids? This should be a single class that implements EntryPoint that we can run.

We will look into the performance of the code. The changes to the grid DOM dom appearance should be improving performance, not reducing. Out tests have shown this to be true. However, there could be problems with the row expander (different markup) and / or the nested grids.

If you can provide the test case we will look into both issues.

12 Mar 2012, 5:54 AM
What i do (and i am sure you might have a better way of doing this) is:

1) create the nested grid by getting inner html:

public void configureExpanderColumn() {
final List<ColumnConfig> columns = configureExpandableColumns();

IdentityValueProvider<Object> identity = new IdentityValueProvider<Object>();
rowExpander = new ManualRowExpander<Object>(identity, new AbstractCell<Object>() {

public void render(Context context, Object value, SafeHtmlBuilder sb) {
Log.debug("Expand", value.getClass().getName());

AttachableGrid grid = createInnerGrid(getModelKeyProvider(), columns, value);


where ManualRowExpander is:

public class ManualRowExpander<M> extends RowExpander<M> {
public ManualRowExpander(IdentityValueProvider<M> valueProvider,
Cell<M> contentCell) {
super(valueProvider, contentCell);

public void manuallyExpandRow(XElement row) {

note, i subclass the grid class so that i can make onAttach() public, i couldn't find a better way to do this.

2) I add a refresh handler to the grid, so that everytime the grid is refreshed/update i keep the state of those rows that have been expanded.

grid.addRefreshHandler(new RefreshHandler() {

public void onRefresh(RefreshEvent event) {
//rexpand column in column list
List items = grid.getStore().getAll();

for (String key : expandedItems) {

for (int i=0; i < items.size(); i++)
Object item = items.get(i);
boolean match = match(key, item);
if(match) {
Element elem = grid.getView().getRow(i);
ManualRowExpander rowExpander = getRowExpander();

16 Apr 2012, 2:33 PM
I have upgraded to rc2. I realized that the issue that i see with selecting a row after an expanded row with a nested grid is due to the following:

In GridBaseAppearance:

public NodeList<Element> getRows(XElement parent) {
return DomQuery.select("." + style.row(), parent);

So if i have a grid with 10 rows, if i expand a row, it returns 11 rows (including the expanded one). How can i fix this? Or is there a better easier way to do nested expanded grids?