Change directory but file count is from the previous directory

2 posts, 0 answers
  1. Fred
    Fred avatar
    53 posts
    Member since:
    Aug 2011

    Posted 12 Jul 2012 Link to this post

    What is wrong with what I did below. the current directory has 149 files. I change directories to one I know has 0 file and I still get 149 files for the count.

    var explorer = $find("RadFileExplorer1");
    var treeDir = explorer.get_tree().get_selectedNode();
    var currentDir = explorer.getFileExplorerItemFromNode(treeDir).get_path(); // explorer.get_currentDirectory();
    explorer.set_currentDirectory(currentDir, 0);
    var filesCnt = explorer.get_fileList().get_items().length;
  2. Dobromir
    Dobromir avatar
    1633 posts

    Posted 17 Jul 2012 Link to this post

    Hi Fred,

    I am not quite sure I understand the exact issue, could you please describe in more details what you are trying to achieve?

    In the provided code snippet the current folder of the explorer is not changed - the node selected in the tree view is the current folder.

    All the best,
    the Telerik team
    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 their blog feed now.
Back to Top