Results 1 to 4 of 4

Thread: Toggle tree node checkbox click without firing checkchange event

  1. #1
    Sencha User
    Join Date
    Dec 2014
    Posts
    25

    Default Toggle tree node checkbox click without firing checkchange event

    I want to set a tree node checkboxto true without firing the "checkchange" event. How can I do that.

    i tried below
    Code:
    node.parentNode.ui.checkbox.setAttribute("checked", "checked");
    but it doesn't work.
    if I do the toggle, it will fire the "checkchange" event
    Code:
    node.parentNode.getUI().toggleCheck(true);

  2. #2
    Sencha Premium User lumberjack's Avatar
    Join Date
    Nov 2014
    Location
    Kansas
    Posts
    781

    Default

    You could suspend events on your treepanel instance right before you toggle the checkbox, then resume events after the toggle.

    Code:
        if (suspendTreeEvents) {
            tree.suspendEvents();
        }
        tree.getRootNode().firstChild.ui.toggleCheck(true);
        tree.resumeEvents();
    Regards,
    Brian


  3. #3
    Sencha User
    Join Date
    Dec 2014
    Posts
    25

    Default

    Thanks that worked

  4. #4
    Sencha User
    Join Date
    Dec 2014
    Posts
    25

    Default

    Can you please help me with this issue?

    http://stackoverflow.com/questions/2...-asynctreenode

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •