This demo extends the DevExpress ASP.NET File Manager (ASPxFileManager) with a custom toolbar and context menu items. In addition to the default buttons available within the ASPxFileManager, you can integrate custom items and display them within the toolbar or in a context menu.
To add custom items, use the SettingsToolbar.Items and SettingsContextMenu.Items collections. Custom items can be represented by the FileManagerToolbarCustomButton or FileManagerToolbarCustomDropDownButton object and are identified using its CommandName property.
When a custom item is clicked, the CustomCommand event is raised. Its commandName event argument property allows you to identify the clicked item. The ToolbarUpdating event is raised each time the toolbar requires an update and allows you to control item visibility and availability.
In this demo, the toolbar is populated with three custom items and a context menu is populated with a custom item. The CustomCommand event is used to perform a callback to the server (PerformCallback). On the server side, the file manager changes the file area view (View) or displays the selected item property, based on the sent event parameter (Parameter). The ToolbarUpdating event is used to control Property item availability within the toolbar and the context menu, based on the current active area (activeAreaName) and the selected item (GetSelectedItems).