Webservice Load On Demand still show expand/collapse icon for nodes with no children

9 posts, 0 answers
  1. Jacky Chau
    Jacky Chau avatar
    108 posts
    Member since:
    Jun 2005

    Posted 16 Oct 2008 Link to this post

    I am loading child nodes using webservice.  If there are no child nodes, I want the expand/collapse icon to go away.  I tried setting the expand_mode to clientside during the client onTreePopulated event but that didn't do anything.  Is there a way to refresh the state of the node?
  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 17 Oct 2008 Link to this post

    Hello Jacky Chau,

    We will try to fix that problem.

    In the meantime I suggest that you set the ExpandMode to ClientSide in the WebService method.

    I have updated your Telerik Points for finding the problem.

    All the best,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Jacky Chau
    Jacky Chau avatar
    108 posts
    Member since:
    Jun 2005

    Posted 17 Oct 2008 Link to this post

    I dont see how setting the ExpandMode to ClientSide in the WebService method will do anything.  I want the icon to refresh for the node that is being expanded.  For example, I am expanding nodeA and nodeA has no child nodes.  I want the expand/collapse icon for nodeA to now go away.
  4. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 17 Oct 2008 Link to this post

    Hi Jacky Chau,

    I did not understand that you wanted to hide the expand/collapse icon next to the parent node. Actually, if no child nodes are added to the expanded node - this icon will automatically disappear.

    Greetings,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Jacky Chau
    Jacky Chau avatar
    108 posts
    Member since:
    Jun 2005

    Posted 17 Oct 2008 Link to this post

    That's not the behavior I am seeing.  On nodeA expand, it hits a webservice to retrieve childnodes.  If no childnodes are returned, it doesn't remove the expand/collapse icon for nodeA.
  6. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 17 Oct 2008 Link to this post

    Hello Jacky Chau,

    Then I believe the best way to proceed is to send us a sample project in a new support ticket. We will test it locally and find a working solution for you.

    Kind regards,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. Mirac
    Mirac avatar
    6 posts
    Member since:
    Feb 2007

    Posted 22 Sep 2009 Link to this post

    Hi,

    I am experiencing (if not the same) a similar problem.

    I build the tree manually from custom business objects and have the node expand mode set to serverside. The tree is completely built on the first page load, but I need the click event/postback when nodes are selected. It wonders me that the expand/collapse images are shown for leaf nodes. I do not need to load nodes dynamically, I just need the select event.

    I guess the problem is that the leaf nodes thinks they should load child nodes dynamically when clicked? Is there any way to change this behaviour?
  8. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 25 Sep 2009 Link to this post

    Hello Mirac,

    This is controlled by the ExpandMode property of the nodes. If it is set to ServerSide ServerSideCallback or WebService the node will display the expand image. If it is set to ClientSide (the default value) it will display the expand image only if it has child nodes.

    I hope this helps,
    Albert,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  9. Mirac
    Mirac avatar
    6 posts
    Member since:
    Feb 2007

    Posted 29 Sep 2009 Link to this post

    Thanks for your reply. I understand that this is the intended behaviour. It would just be nice to have a "HasChildNodes" or something property to indicate whether the expand/collapse images should be shown or not.
Back to Top