Double Click Load On Demand Node

5 posts, 0 answers
  1. Ingo Buck
    Ingo Buck avatar
    9 posts
    Member since:
    Jan 2009

    Posted 09 Mar 2009 Link to this post

    Hi,

    if I double click a WebService-Load-On-Demand RADTreeNode while expanding is "on going" (Loading...) I get a browser error message:
    'get_element()' is null or not an object. Line 5360.
    IE6 and IE7

    I use RadControls for ASPNET AJAX Q3 2008.

    Any ideas?

    Thanks in Advance.
  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 10 Mar 2009 Link to this post

    Hello Ingo Buck,

    I could not reproduce the problem on our online demo. Can you?

    Also, you might find this troubleshooting article useful:
    Double Loading... message when you expand node fast

    Kind regards,
    Veselin Vasilev
    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.
  3. Ingo Buck
    Ingo Buck avatar
    9 posts
    Member since:
    Jan 2009

    Posted 10 Mar 2009 Link to this post

    Hi.

    No, I can not reproduce. Its too fast.
    I think some more details are important.
    1. My Webservice-Request is busy enough to be able to double-click it twice or more. Or double-click other nodes in-between.
    2. The TreeView is child of an UpdatePanel.
    3. In the OnNodeClick-Event details are opened in another UpdatePanel.

    I already used the javascript of the article mentioned above.
    If you act as a click-monkey, as the customer did to find the error, it ends up in the mess, that the nodes are expanded, but not really expanded and keep in that dead state until pressing the browser refresh button. And it does not fix the problem. So I removed it again :)

    I guess it has something to do with a retriggered AJAX web request. The response of the first one does not find its target node anymore.

    You may include a sleep in the WebMethod of about 500-1000ms to be able to click more than once before responding.

    Kind regards,
    Ingo Buck
  4. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 13 Mar 2009 Link to this post

    Hi Ingo Buck,

    You can use this alternative solution:

    1. Subscribe to OnClientNodeExpanded and disable the treeview in its handler:

    function OnClientNodeExpandedHandler(sender, e) 
        sender.set_enabled(false); 

    2. Enable the treeview in OnClientNodePopulated event handler:

    function OnClientNodePopulatedHandler(sender, e) 
       sender.set_enabled(true); 

    That should fix the problem.

    All the best,
    Veselin Vasilev
    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.
  5. Ingo Buck
    Ingo Buck avatar
    9 posts
    Member since:
    Jan 2009

    Posted 16 Mar 2009 Link to this post

    Hi Veselin Vasilev,

    not exactly, but it works now. There was just a single problem left:
    If you expand a node a second time, OnClientNodeExpanded is called, but OnClientNodePopulated is not. (PersistLoadOnDemandNode=True).
    The OnClientNodeExpandedHandler should be modified to check whether or not a node has child nodes already.

    function OnClientNodeExpandedHandler(sender, e) { 
                var node = e.get_node(); 
                if (node != null) if (node.get_nodes().get_count() <= 0) sender.set_enabled(false); 
            } 

    Thanks a lot,
    Ingo Buck
Back to Top