Announcement

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

    ListGrid Group Tree Open issue

    I'm facing a problem with opening (expanding) the Group tree on a List Grid when user manually selects "Groups by" on a list grid field from the column header's context menu.

    The problem is reproducible on the Showcase example "GridDynamicGroupingSample". I also tried to get it working by adding a GroupByHandler, but haven't been successful yet. See my code at the end of this post.

    Steps to reproduce the problem:

    1. Go to the showcase example "GridDynamicGroupingSample". Initially (by default) the list is grouped by "Continent".

    2. Now group the list by "Country" by selecting "Group by Country" from the Country column header's context menu.

    You'll notice that after the group by is changed to Country, the groups are "closed". My requirement is to have all the groups "open" whenever the group by setting is changed by users.

    I added the following code to the showcase example, but it didn't solve the problem. I get the "hello" popup but the group tree is "not" opened.

    Code:
            countryGrid.addGroupByHandler(new GroupByHandler() {
                
                public void onGroupBy(GroupByEvent event) {             
    
                    Tree tree = countryGrid.getGroupTree();
    
                    if (tree != null)
                    {
                        SC.say("hello");
                        tree.openAll();                       
                    }
                }
            });
    I'm using SmartGWT LGPL 2.5, Mar 1, 2011 nightly on Windows XP SP3, Chrome 9x / FF 3.6.2.

    I'll really appreciate if someone can help me on this. Thanks.
Working...
X