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

select item after async upload

1 Answer 55 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Kanal8
Top achievements
Rank 1
Kanal8 asked on 12 Jun 2012, 07:54 AM
Hello Telerik,
is there a possibility to select an uploaded file after async upload?
I've tried it on OnClientFolderChange but the event fired too early.

function OnClientFolderChange(sender, args) {
            var oUpload = $find("<%= FileExplorer1.AsyncUpload.ClientID %>");
            if (oUpload.getUploadedFiles().length > 0) {
                var ex = GetFileExplorer();
                selectSpecificFile(ex, oUpload.getUploadedFiles());
            }
        }
 
        function selectSpecificFile(explorer, items) {
            var tree = explorer.get_tree();
            if (tree != null) {
                var nodes = tree.get_selectedNodes();
                if (nodes != null && nodes.length > 0) {
                    if (nodes[0]._children != null) {
                        for (var i = 0; i < items.length; i++) {
                            for (var x = 0; x < nodes[0].get_allNodes().length; x++) {
                                var currentNode = nodes[0].get_allNodes()[x];
                                if (currentNode.get_text() == items[i]) {
                                    currentNode.select();
                                }
                            }
                        }
                    }
                }
            }
        }

1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 15 Jun 2012, 09:48 AM
Hi Rene,

At present, this functionality of RadFileExplorer is disabled when AsyncUpload is used and it cannot be easily achieved. The root of the problem is that the AsyncUpload's logic greatly differs from the RadFileExplorer's base functionality.

However, we do plan to improve this behavior of the explorer but I cannot provide a firm estimate for when this will be available.

Regards,
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
Kanal8
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Share this question
or