Skip to main content
A newer version of this page is available. .
Tab

FileManagerFolderCreateEventArgs.ParentFolder Property

Gets the parent folder for the newly created item.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.1.dll

Declaration

public FileManagerFolder ParentFolder { get; }

Property Value

Type Description
FileManagerFolder

A FileManagerFolder object representing the parent folder.

Remarks

Use the ParentFolder property to identify and access the immediate parent folder which owns the newly created item.

Example

The code below demonstrates how you can handle the FolderCreating event, to prevent creation of child folders for the root folder.

The image below shows the result.

ASPxFileManager - FolderCreating

protected void ASPxFileManager1_FolderCreating(object source, DevExpress.Web.FileManagerFolderCreateEventArgs e) {
      if (e.ParentFolder.FullName == "Files")
            e.Cancel = true;
            e.ErrorText = "You cannot create child folders for the root folder";
}
See Also