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

loadFolder and set_currentDirectory client methods don't resfresh treeview

2 Answers 79 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Vladimir Gosic
Top achievements
Rank 1
Vladimir Gosic asked on 19 Oct 2010, 11:10 AM
Hello!

I use FileExplorer with custom content provider to display some documents in the virtual folder of the application, and to hide some files (config files, etc.), and to add some custom columns to the grid (date created, modified). I have a scenario where I need to display content of a sub directory of the InitialPath directory and I am using client methods to achieve it. I tried using both loadFolder and set_currentDirectory followed by fileExplorer.refresh() but the result is the same, explorer's Grid shows requested directory but the TreeView still display root directory selected (InitialPath directory), and I need it to display the requested directory expanded and selected in TreeView.
Is this a know issue and is there a workaround to achieve wanted functionality?

With regards,
Vladimir

2 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 22 Oct 2010, 07:47 AM
Hi Vladimir,

I am not quite sure that I completely understood your scenario;
  1. If you need to expand a directory on initial load, you can just set it to the RadFileExplorer's InitialPath property and it will be automatically expanded
  2. In case that you need to load a specific folder, then I recommend you to use the loadFolder method of the control:
    function laodFolder()
    {
        var path = "/FileExplorer_/ExplorerSource/ROOT6/NewFolderasdfasdf/ROOT11/NewFolderasdfasdf/ROOT11";
        var oExplorer = $find("RadFileExplorer1");
        oExplorer.loadFolder(path);
    }

    Please note that the value of the path variable should be match the value shown in the RadFileExplorer's addressbar. You can get this value by navigating (in RadFileExplorer) to the folder that you need to load and then copying the path shown in the address bar.

All the best,
Fiko
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
0
Vladimir Gosic
Top achievements
Rank 1
answered on 29 Oct 2010, 10:48 AM
Hi Fiko,
I need functionality as described in your 2. scenario. And I managed to achieve it, as I noticed that in your example you passed the path to the loadFolder method without "~" root indicator. When I removed it from the value that I passed to the loadFolder everything worked as expected. Interesting thing is that when I used the server path together with "~" tilde, all controls in FileExplorer (address bar, grid) managed to show the requested folder, only the treeview would have the root folder selected. Thank you for your answer as it gave me an idea to try which lead to solving my problem.

Regards,
Vladimir
Tags
FileExplorer
Asked by
Vladimir Gosic
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Vladimir Gosic
Top achievements
Rank 1
Share this question
or