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

Change directory but file count is from the previous directory

1 Answer 24 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Fred
Top achievements
Rank 1
Fred asked on 12 Jul 2012, 07:02 PM

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);
explorer.clearFolderCache();
var filesCnt = explorer.get_fileList().get_items().length;

1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 17 Jul 2012, 12:57 PM
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,
Dobromir
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.
Tags
FileExplorer
Asked by
Fred
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Share this question
or