Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Fred Heggenes 2 posts 22 karma points
    Jul 01, 2015 @ 15:29
    Fred Heggenes
    0

    Load children of node in treepicker asynchronously

    Hello,

    I am trying to make a treepicker populate its children (from a list of ~10 top level categories) based on an async API call.

    I have made a treepicker that will let me select nodes and the callback on the dialogservice.treePicker function lets you do stuff once you've hit the select button, but how can I capture the a actual expanding of a node, so that I can go get the children only at that point and not on load?

    The reason being the datasets coming are quite large, they cannot all be loaded at once. There would be the ca. 10 top level ones, and then expanding one should get the relevant subcategories for that category, and those subcategories may have further children, etc.

    I've had a good look around but can't seem to figure out if this is at all possible.

    Thanks in advance for any insight you can provide!

  • Fred Heggenes 2 posts 22 karma points
    Jul 03, 2015 @ 13:57
    Fred Heggenes
    0

    Disregard this question, this actually happens automatically anyway.

    For each expand of a node, the GetTreeNodes custom method (server side) gets called, and can bring back children of parent node based on the id of the parent node being passed in.

Please Sign in or register to post replies

Write your reply to:

Draft