+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Treeview CurrentNode not highlighting after upgrade

Treeview CurrentNode not highlighting after upgrade

9 posts, 1 answered
  1. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    26 May 2011
    Link to this post
    Hi,

    Bit of a strange one here. We recently changed our site (and sitefinity version) to .NET 4.0, and now for some reason the treeview control we're using on our site isnt displaying the currentNode as being highlighted, instead it is just highlighting the parentNode, no matter which child page is actually selected.

    After jumping into Developer Tools, the rtSelected class is not being set anywhere other than the parentNode.

    Any reason why this would be different after the upgrade? We've tried with the new and old RadTreeview controls, neither is highlighting the currentNode.

    Looks like my problem is similar to the one here:
    http://www.sitefinity.com/devnet/forums/sitefinity-3-x/designing-with-sitefinity/treeview-highlighting-current-page.aspx

    Although seems strange that it used to work.

    Anyway, let me know if there's a known solution for this.

    Thanks,
    Paul
  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    02 Dec 2016
    30 May 2011
    Link to this post
    Hello Paul N,

    Can you please share with us some more information about the control you are developing that uses RadTreeView and if you have done any customizations to it. Also, which version of Sitefinity are you testing this with? I have just tested the functionality( using build version 4.1.1405)  of both the built in Sitefinity Navigation control in TreeView mode and a RadTreeView control on a Sitefinity page and both highlight the current node. Please check the attached screenshot for more information.

    All the best,
    Boyan Barnev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    30 May 2011
    Link to this post
    Hi Boyan,

    The problem we're having is for Sitefinity 3. We're currently using Sitefinity 3.7 SP4 (.NET 4.0).
    I've attached the problem. The node I've highlighted is the current page I am on, but as you can see the control is only showing the parent node as selected. We haven't customized the controls at all, just added some styling which doesn't effect the control in any way. To ensure the control was fully uncustomized I replaced the control with the one from the 3.7 SP4 (.NET4) patch, and that still did not fix the problem.

    Thanks,
    Paul
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    30 May 2011
    Link to this post
    Hello Paul N,

    Is there a live link where we can see the RadTreeView? When you observe the css classes is there "selected" class set for the current node?

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    30 May 2011
    Link to this post
    Hi Ivan,

    You can see the live site here:
    http://www.magnetism.co.nz/solutionscasestudies/solutions/msketch.aspx

    On the left you will see 'Dynamics CRM Solutions' (the parent node) and underneath are the child nodes which are not being selected.

    Using dev tools shows that only the parent node contains the 'rtSelected' class.

    Thanks,
    Paul
  6. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    02 Dec 2016
    31 May 2011
    Link to this post
    Hi Paul N,

    Thank you for getting back to us. I've inspected the provided link and indeed the reported behavior does reproduce. However, I see you are using Sitefinity 3.x not the 4.x version, so I hope you don't mind if I move this thread under the correct topic. Can you, please, confirm if placing the TreeView control on a blank page in Sitefinty (using one of the default templates or none) reproduces the same behavior? Also, is it possible to provide me with some temporary login credentials so that I can inspect this issue further?

    All the best,
    Boyan Barnev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    31 May 2011
    Link to this post
    Hi Boyan,

    I set up a blank page and got the same result:
    http://www.magnetism.co.nz/level1/level2/level3/level4.aspx

    I can set you up with a user in our sitefinity, can you provide me with an email I can send the login details to, or send me an email and i'll set up your account.

    Thanks for switching the threads, didn't realise I was posting in the SF 4 forums.

    Paul
  8. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    02 Dec 2016
    31 May 2011
    Link to this post
    Hello Paul N,

    I have replied to your email, please send me back the login credentials whenever you can, and I will proceed with inspecting the problem. By the way, did you try the provided sample in the forum thread you mentioned int he beginning of our conversation? It has been tested, and I just verified that it is working, so maybe you could give it a try (please make sure to specify the proper ID of your TreeView control when including the script on your page). For your convenience I'm pasting below the version I've just verified on my local project:

    function pageLoad() {
            var tree = $find("<%= RadTreeview1.ClientID %>");
            if (tree) {
                var location = window.location.pathname;
                location = location.substring(location.lastIndexOf('/') + 1);
                var currentNode = tree.findNodeByUrl(location);
                if (currentNode) {
                    currentNode.set_selected(true);
                }
            }
        }


    Best wishes,
    Boyan Barnev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  9. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    31 May 2011
    Link to this post
    Hi Boyan,

    That actually worked...

    Good work around, you can still investigate the problem if you wish, but for now this will do as a fix.

    Many Thanks,
    Paul
Register for webinar
9 posts, 1 answered