Refresh root folder name

2 posts, 0 answers
  1. Andreas
    Andreas avatar
    12 posts
    Member since:
    Aug 2010

    Posted 16 Feb 2011 Link to this post

    In some instances, I want to rename my root folder (top node ni TreeView). This is done via an ajax call that triggers the rename in the backend. After that ajax call is done, I call explorer.refresh() (client side). However, the name of the top node in the TreeView doesn't update.

    When calling explorer.refresh() I've verified that PageLoad is executed in the code behind. I update the "root folder" paths during page load:
    fileExplorer.Configuration.ViewPaths = new[] { newRootFolderName };
    fileExplorer.Configuration.UploadPaths = new[] { newRootFolderName };
    fileExplorer.Configuration.DeletePaths = new[] { newRootFolderName }; 

    Still, the root folder name doesn't update in the TreeView on the page.


    Is there a way to update the root folder (except doing a hard refresh)?

  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 21 Feb 2011 Link to this post

    Hi Andreas,

    If I understand your scenario correctly you want to change the root folder of the RadFileExplore with an AJAX call. To ensure that the new folder will be populated in the in the TreeView you need to clear collection previous loaded folder before setting the new ViewPaths, e.g.:
    RadFileExplorer1.TreeView.Nodes.Clear();
    RadFileExplorer1.Configuration.ViewPaths = new String[] { "~/ROOT/NewFolder12" };

    If this is not the case could you please describe in more details what exactly you are trying to achieve? A sample page demonstrating the specific scenario will be of great help.

    Best wishes,
    Dobromir
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top