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

Context Menu

The ASPxFileManager context menu is a popup menu displayed when an end-user right-clicks a file manager element. To enable the context menu, use the FileManagerSettingsContextMenu.Enabled property.

ASPxFileManager_ContextMenu

The FileManagerSettingsContextMenu.Items property allows populating the collection of menu items with default and custom items. If the item collection is empty, default items are displayed.

When a file manager updates its context menu, the ASPxClientFileManager.ToolbarUpdating event is raised, allowing you to change item availability. You can determine the currently active area using the event argument’s ASPxClientFileManagerToolbarUpdatingEventArgs.activeAreaName property. To access a particular context menu item, use the ASPxClientFileManager.GetContextMenuItemByCommandName method.

Example

The complete sample is available in the DevExpress online demo File Manager - Custom Toolbar

function OnToolbarUpdating(s, e) {
     var enabled = (e.activeAreaName == "Folders" || FileManager.GetSelectedItems().length > 0) && e.activeAreaName != "None";
     FileManager.GetContextMenuItemByCommandName ("Properties").SetEnabled(enabled);
}
See Also