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

refresh file explorer

1 Answer 154 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Morten asked on 21 Nov 2012, 03:28 PM
Below a FileExplorer I have a button that deletes selected files.
After deletion I would like to refresh the FileExplorer.
If I do this:

var oExplorer = $find('<%= fe.ClientID %>');
oExplorer.refresh();

only the file list gets refreshed. The TreeView is not refreshed.

How do I refresh both the list and the treeview?

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 21 Nov 2012, 04:59 PM
Hi,

You could force the content of the RadFileExplorer to be reloaded by calling the       RadFileExplorer1.TreeView.Nodes.Clear() function, e.g in the handler of the ItemCommand event on the server:
public void RadFileExplorer1_ItemCommand(object sender, Telerik.Web.UI.RadFileExplorerEventArgs e)
{
    if (e.Command == "DeleteFile" || e.Command == "DeleteDirectory")
    {
        RadFileExplorer1.TreeView.Nodes.Clear();
    }
}

Regards,
Vesi
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
Morten
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Vessy
Telerik team
Share this question
or