Want Users to see Only Folders

4 posts, 1 answers
  1. GP
    GP avatar
    58 posts
    Member since:
    Oct 2009

    Posted 18 Mar 2013 Link to this post

    Is there a way to just show folders?  We are trying to use the file explorer for users to select the folder they want to save into.  We don't want them picking accidentally .pdf file to save into.

    Thanks!
  2. Answer
    Vessy
    Admin
    Vessy avatar
    1385 posts

    Posted 19 Mar 2013 Link to this post

    Hi Genie,

    A way to achieve the described scenario is to show only the folders' tree to the users, by configuring the FileExplorer's VisibleControls property in a similar way:
    <telerik:RadFileExplorer ID="FileExplorer1" runat="server" EnableCopy="true" VisibleControls="Toolbar,TreeView,ContextMenus,AddressBox">
        <Configuration ViewPaths="~/" DeletePaths="~/" UploadPaths="~/"/>
    </telerik:RadFileExplorer>

    Nevertheless, if you want to keep visible both the TreeView and the Grid, another possible approach is attach a handler to the ExplorerPopulated Server-side event, where to remove the files from the shown items:
    protected void RadFileExplorer1_ExplorerPopulated(object sender, RadFileExplorerPopulatedEventArgs e)
    {
        List<FileBrowserItem> items = e.List;
     
        if (e.ControlName == "grid")
        {
            int i = 0;
            while (i < items.Count)
            {
                if (items[i] is FileItem)
                {
                    items.Remove(items[i]);
                }
                else
                {
                    i++;
                }
            }
        }
    }


    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
  4. GP
    GP avatar
    58 posts
    Member since:
    Oct 2009

    Posted 26 Mar 2013 Link to this post

    That worked.  Thank you!
  5. Aravind
    Aravind avatar
    41 posts
    Member since:
    Jun 2013

    Posted 07 Feb 2014 in reply to Vessy Link to this post

    Hai

        same like is it possible to get system folder structure ? in ur example only show website folder in server,but i need to show folder structure of server machine and can select folder and show path in textbox same as ur example.
Back to Top