1 Reply Latest reply on Jul 26, 2007 5:53 AM by Alin C.

    Tree lazy loading

    Alin C.
      I need a way to make a Tree load data using lazy-loading method.
      I have found on the internet that Tree control has a bug, and doesn't support lazy loading.
      Does anyone have a solutions to this? Workaround? Or, how can be implemented a lazy-loading mechanism?

        • 1. Re: Tree lazy loading
          Alin C. Level 1
          Found the answer:

          Using TreeEvent.ITEM_OPENING to handle when user click on a branch.

          Prevent opening... e.preventDefault()

          Check then is selectedItem has children, if has then
          selectedItem.children=new Array();
          selectedItem.children = myFunctionToGetChildren(parentId);

          In the end, expandItem(e.item))