FileManagerFolderCreateEventArgs.ParentFolder Property
In This Article
Gets the parent folder for the newly created item.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
public FileManagerFolder ParentFolder { get; }
#Property Value
Type | Description |
---|---|
File |
A File |
#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.
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