refresh file explorer

2 posts, 0 answers
  1. Morten
    Morten avatar
    267 posts
    Member since:
    Jul 2012

    Posted 21 Nov 2012 Link to this post

    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?
  2. Vessy
    Admin
    Vessy avatar
    1389 posts

    Posted 21 Nov 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top