Render plus image without fetching child nodes

2 posts, 0 answers
  1. Flores
    Flores avatar
    8 posts
    Member since:
    Sep 2008

    Posted 14 May 2009 Link to this post

    Hi,

    I have a RadTreeView that I populate client-side. This works ok. However, I have to load too many data for the plus signs to render correctly. A plus sign is not rendered if a node has no child nodes. Getting the child nodes themselves is an expensive operation, however, so I'd like to postpone fetching them until the client-side ClientNodeExpanding event occurs.

    A small example: I have a tree with one root node: A. A has a number of child nodes: x, y, z. What I'd like to to is add A to the tree but not add x, y, z to A. If I do this, no expand control (plus) is rendered. That makes sense because A does not have children. However, adding x, y, z to A just to make sure that A is rendered as an expandable node is too expensive. I'd like to tell node A that it has children but not yet add them.

    Is this possible?

    Kind regards,
    Flores
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 14 May 2009 Link to this post

    Hello Flores,

    This is only possible if you use load on demand. You need to set the ExpandMode property of that node to any value other than ClientSide.

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top