loadFolder and set_currentDirectory client methods don't resfresh treeview

3 posts, 0 answers
  1. Vladimir Gosic
    Vladimir Gosic avatar
    15 posts
    Member since:
    May 2010

    Posted 19 Oct 2010 Link to this post

    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. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 22 Oct 2010 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vladimir Gosic
    Vladimir Gosic avatar
    15 posts
    Member since:
    May 2010

    Posted 29 Oct 2010 Link to this post

    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
Back to Top