Show Content of Selected Node

3 posts, 0 answers
  1. Brian
    Brian avatar
    68 posts
    Member since:
    Jun 2011

    Posted 17 Sep 2013 Link to this post

    How do I do this?
    I have a website that requires a username and password in order to access the site. The name of the user that logs in determines which treeview node in the left-hand pane of FileExplorer receives focus. Basically in OnLoadComplete() I have:
        userNode.Selected = true;
    This does select the correct node immediately after the user logs in, but the right-hand pane of FileExplorer displays the files and folders that are associated with the root node, instead of displaying the files and folders of the selected node. How do I get the right-hand pane to display the content (files and folders) that are associated with the programmatically selected node, instead of displaying the content of the root node?

    Thank you

  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 19 Sep 2013 Link to this post

    Hi Brian,

    If I understand you correctly, you need to load initial folder according the logged user. To do so, you need to set RadFileExplorer's InitialPath property.

    Please see the following live demo for more information:
    http://demos.telerik.com/aspnet-ajax/fileexplorer/examples/server-sideapi/initialpathandpaging/defaultcs.aspx

    Regards,
    Dobromir
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Brian
    Brian avatar
    68 posts
    Member since:
    Jun 2011

    Posted 19 Sep 2013 Link to this post

    OK, so I was already setting InitialPath in the page load, but it was being set to the root folder. By setting it to the user's folder instead, that resolved my issue, and it was no longer necessary for me to use the userNode.Selected = true;

    Thank you.
Back to Top