Back to Devexpress

ASPxFileManager.ItemRenaming Event

aspnet-devexpress-dot-web-dot-aspxfilemanager-6af9d5db.md

latest3.0 KB
Original Source

ASPxFileManager.ItemRenaming Event

Fires on the server side before an item is renamed and allows you to cancel the action.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public event FileManagerItemRenameEventHandler ItemRenaming
vb
Public Event ItemRenaming As FileManagerItemRenameEventHandler

Event Data

The ItemRenaming event's data class is FileManagerItemRenameEventArgs. The following properties provide information specific to this event:

PropertyDescription
CancelGets or sets a value indicating whether the action that raised the event should be canceled. Inherited from FileManagerActionEventArgsBase.
ErrorTextGets or sets a text for the explanatory message. Inherited from FileManagerActionEventArgsBase.
ItemGets an item object related to the event.
NewNameGets a new name for the item currently being renamed.

Remarks

Each time an item is going to be renamed on the server side, the ItemRenaming event occurs, allowing you to cancel the action. The event parameter’s FileManagerItemRenameEventArgs.Item property identifies the item that is being processed. The new name of the item can be obtained via the FileManagerItemRenameEventArgs.NewName property. To cancel the delete operation, set the FileManagerActionEventArgsBase.Cancel property to true. In order to show the message, explaining the reason for the delete cancellation, specify the FileManagerActionEventArgsBase.ErrorText property.

See Also

ItemRenaming

AllowRename

Rename Button

File Manager

ASPxFileManager Class

ASPxFileManager Members

DevExpress.Web Namespace