Return to Snippet

Revision: 37372
at December 9, 2010 02:30 by simondiercks


Initial Code
function foldingAll(state, levels) { 
        // state: boolean, expand all rows if true, collapse all rows if false 
        // level: integer, how many levels will be affected 
        for (var i = 0; i < levels; i++) { 
                var v = grid.views.views[grid.views.views.length - 1]; 
                for (var e in v._expandos) { 
                        for (var a in v._expandos[e]) { 
                                var expando = (v._expandos[e])[a]; 
                                if (expando.open != state) { 
                                        expando.setOpen(state); 
                                } 
                        } 
                } 
        } 
}

Initial URL
http://dojo-toolkit.33424.n3.nabble.com/treegrid-help-needed-td904685.html

Initial Description

                                

Initial Title
expanding / collapsing all rows in dojo treegrid

Initial Tags

                                

Initial Language
PHP