[CLOSED] Treepanel Checkboxes

  1. #1

    [CLOSED] Treepanel Checkboxes

    Hi,
    How do I Check all the Child checkboxes when a Parent is checked and vice versa how do I uncheck the parent if any of those child checkboxes is Unchecked?
    Any samples?
    Last edited by geoffrey.mcgill; Aug 12, 2010 at 10:28 PM. Reason: [CLOSED]
  2. #2
    Hello!

    Please follow the link to get an example.
  3. #3
    The key is
    #{TreePanel1}.getRootNode().cascade(function(n){n.ui.toggleCheck(false);});
    There should be a node for checking (or unchecking) instead of
    #{TreePanel1}.getRootNode()
  4. #4
    Daniil,
    I do not want to check the parent if the child is checked.

    In my treepanel when I Check the Parent, I want all HIS children to be checked and IFF any of those children is Un-Checked then I want the ONLY the Parent to be unchecked NOT the Siblings of that child.
    Please help.
  5. #5
    Anybody out there?
  6. #6
    Hi,

    Please use the following tree panel listener
    <CheckChange Handler="node.cascade(function(n){n.ui.toggleCheck(checked);}); if(!checked && node.parentNode){this.suspendEvents(); node.parentNode.ui.toggleCheck(false); this.resumeEvents();}"/>

Similar Threads

  1. Replies: 4
    Last Post: Nov 02, 2012, 7:46 AM
  2. [CLOSED] Check and uncheck all checkboxes treepanel
    By CarWise in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Aug 11, 2010, 10:50 AM
  3. [CLOSED] Custom search with checkboxes
    By jchau in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 24, 2009, 8:28 PM
  4. [CLOSED] Checkboxes in CheckBoxGroup
    By methode in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 11, 2009, 3:27 PM

Posting Permissions