EnableCreateNewFolder to no avail.

2 posts, 0 answers
  1. Sebastian
    Sebastian avatar
    13 posts
    Member since:
    Feb 2009

    Posted 03 Feb 2010 Link to this post

    Hi,

    I want to enable creation of new folders in the RadFileExplorer. For this I set the property accordingly on control creation:

            private RadFileExplorer CreateAndInitializeExplorer() 
            { 
                RadFileExplorer explorer = new RadFileExplorer() 
                { 
                    EnableViewState = true
                    VisibleControls = FileExplorerControls.All ^ FileExplorerControls.AddressBox, // only disable AddressBox. show everything else 
                    Width = 900.Pixel(), 
                    EnableCreateNewFolder = true
                    EnableCopy = false 
                }; 
     
                explorer.Load += Explorer_OnLoad; 
                explorer.PreRender += Explorer_PreRender; 
     
                explorer.Configuration.ContentProviderTypeName = typeof(MyContentProvider).AssemblyQualifiedName; 
     
                string[] basePath = MyContentProvider.GetRootsPaths(); 
                explorer.Configuration.ViewPaths = basePath; 
                explorer.Configuration.UploadPaths = basePath; 
                explorer.Configuration.DeletePaths = basePath; 
     
                return explorer; 
            } 

    Still, the toolbar and context menu items to create a new Folder are not displayed. All DirectoryItems (that is really every single Item) that are provided from MyContentProvider have the following permissions set:
    private const PathPermissions FULL_PERMISSIONS = PathPermissions.Read | PathPermissions.Delete | PathPermissions.Upload; 

    So there should be no problem with the permissions of the item.

    Please help me to get this sorted out. I need the Create New Folder functionality available for my users.

    Regards,

       Sebastian
  2. Sebastian
    Sebastian avatar
    13 posts
    Member since:
    Feb 2009

    Posted 03 Feb 2010 Link to this post

    Whoops. Sorry.
    A simple
    public override bool CanCreateDirectory { get { return true; } } 
    On my custom provider fixed it.

    Sorry again,

       Sebastian
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top