[Users] button to uncheck all the layers in my Ext.tree.TreePanel

Jacinto Estima jacinto.estima at gmail.com
Wed Sep 5 08:36:37 CEST 2012


Hi,

 

I am trying to develop a button to uncheck all the layers in my
Ext.tree.TreePanel but without success so far.

Does anyone have ideas?

 

I'm using the following code that I've found:

 

var unckeckAll = new Ext.Button({

              text: "Uncheck All",

              listeners:{

                     reset: function (){

                   startNode = LayerTree.root;

                   var f = function () {

                       if (LayerTree.attributes.checked) {

                            LayerTree.attributes.checked = false;

                            LayerTree.getUI().toggleCheck(false);

                       }

                   };

                   startNode.cascade(f);

               }

           }            

       });

 

Thanks,

Jacinto

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20120905/9f0371e1/attachment.htm 


More information about the Users mailing list