This is a migrated thread and some comments may be shown as answers.

Refresh root folder name

1 Answer 58 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Andreas
Top achievements
Rank 1
Andreas asked on 16 Feb 2011, 01:57 PM
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)?

1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 21 Feb 2011, 01:47 PM
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!
Tags
FileExplorer
Asked by
Andreas
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Share this question
or