Posted By

simondiercks on 12/09/10


Tagged

collapse expand Dojo treegrid


Versions (?)

expanding / collapsing all rows in dojo treegrid


 / Published in: PHP
 

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

  1. function foldingAll(state, levels) {
  2. // state: boolean, expand all rows if true, collapse all rows if false
  3. // level: integer, how many levels will be affected
  4. for (var i = 0; i < levels; i++) {
  5. var v = grid.views.views[grid.views.views.length - 1];
  6. for (var e in v._expandos) {
  7. for (var a in v._expandos[e]) {
  8. var expando = (v._expandos[e])[a];
  9. if (expando.open != state) {
  10. expando.setOpen(state);
  11. }
  12. }
  13. }
  14. }
  15. }

Report this snippet  

You need to login to post a comment.