Maybe this thread in the ExtJS forum will help. http://www.extjs.com/forum/showthread.php?36179-TreePanel-Smart-Checkboxes
Pierre On Wed, Jun 9, 2010 at 7:28 AM, Eric Lemoine <[email protected]> wrote: > On Tuesday, June 8, 2010, Julien-Samuel Lacroix <[email protected]> wrote: >> Hi, >> >> The problem of this code is that selecting all layers in the >> LayerContainer doesn't select the parent checkbox. Any idea? > > Hi Julien > > > I've never done this myself but can't you listen to "checkchange" > events from the tree panel and do the following in the listener: > > - if the node is a layer node, and if that node and its siblings are > (un)checked, then (un)check the parent node > - if the node has layer nodes as its children, check/uncheck these > children nodes as appropriate > > You can possibly implement this in a plugin, whose "init" method will > register the "checkchange" listener on the tree panel. > > Hope it helps, > > -- > Eric Lemoine > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 96 > Mail : [email protected] > http://www.camptocamp.com > _______________________________________________ > Users mailing list > [email protected] > http://www.geoext.org/cgi-bin/mailman/listinfo/users > -- Pierre GIRAUD Géomaticien, Analyste Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 93 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
