OnClientNodeExpanded fires too early

7 posts, 0 answers
  1. Lighthouse Developer
    Lighthouse Developer avatar
    34 posts
    Member since:
    Feb 2010

    Posted 30 Mar 2010 Link to this post

    For my tastes, anyway. It seems that it fires the moment the user clicks on the expand icon. I want an event that fires when the node is expanded, which frankly is what I expected...Any solution for that? I want it for some code that has something to do with height so I need to get the final expanded height. I tried using a timer with a delay longer than the animation duration but no luck. Any help would be appreciated.
  2. Dimitar Milushev
    Admin
    Dimitar Milushev avatar
    555 posts

    Posted 30 Mar 2010 Link to this post

    Hello,

    This was done to prevent the case where the user collapses the node before it's fully expanded and the ClientNodeExpand is never fired. This could cause problems in some scenarios, but you are right that some scenarios (especially those that rely on checking the height of the TreeView/Node) require an event that is fired after the Node is fully expanded/collapsed. That's why we are planning to add something like AnimationEnd event so we can cover both scenarios without breaking existing functionality.

    Interestingly, using a timeout set to the duration of the animation should work as a workaround. What was the problem you encountered in this case?

    Best wishes,
    Dimitar Milushev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Lighthouse Developer
    Lighthouse Developer avatar
    34 posts
    Member since:
    Feb 2010

    Posted 30 Mar 2010 Link to this post

    It sometimes works and it sometimes doesn't. The code appears solid since if I run it from Firebug after the nodes have expanded it works as it should...
  5. Fit2Page
    Fit2Page avatar
    345 posts
    Member since:
    Feb 2007

    Posted 30 Mar 2010 Link to this post

    I got exactly the same problem. Solved by

    function onNodeExpanded(sender, args)
    {
    setTimeout("SetGroupHeight()", 50);
    }
  6. Dimitar Milushev
    Admin
    Dimitar Milushev avatar
    555 posts

    Posted 30 Mar 2010 Link to this post

    Hello,

    If the timeout doesn't work every time, try increasing the delay slightly so it is a bit longer that the duration of the animation. The timeout delay is not very precise in most browsers which could be causing the erratic behavior.

    Greetings,
    Dimitar Milushev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Lighthouse Developer
    Lighthouse Developer avatar
    34 posts
    Member since:
    Feb 2010

    Posted 30 Mar 2010 Link to this post

    I have. I even explicitly defined the animation time and put an almost double that delay...
  8. Dimitar Milushev
    Admin
    Dimitar Milushev avatar
    555 posts

    Posted 07 Apr 2010 Link to this post

    Hello,

    It is confirmed that the next RadControls Service Pack, scheduled for next week, will include a new client-side event for RadTreeView, OnClientNodeAnimationEnd, which should solve this and similar problems.

    Kind regards,
    Dimitar Milushev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017