Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Show All Themes

Custom Toolbar

  • Expand/collapse folder containerExpand/collapse folder container
  • RefreshRefresh
  • Thumbnails View
  • Details View
  • Collapse
    • Expand
      • Expand
        • FolderTest project
        • FolderXml list
      • FolderReports
    • Expand
      • FolderEmployees
      • FolderProduct icons
    • FolderMusic
    • FolderSystem
    • FolderVideo

This demo illustrates how to extend the DevExpress ASP.NET MVC File Manager extension with custom toolbar and context menu items.

In addition to default buttons available within File Manager, you can integrate custom items and display them in a toolbar or in a context menu. To add custom items, use the SettingsToolbar.Items and SettingsContextMenu.Items collections. Custom items can be implemented by the FileManagerToolbarCustomButton or FileManagerToolbarCustomDropDownButton object and are identified using its CommandName property.

When a custom item is clicked, the CustomCommand client event is raised. Its commandName event argument property allows you to identify the clicked item. The ToolbarUpdating event is raised every 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 side (PerformCallback). On the server side, the file manager changes the file area view (SettingsFileList.View) or displays the selected item property, based in the sent event parameter (Parameter).

The ToolbarUpdating event is used to control the Property item availability within the toolbar and the context menu, based on the current active area (activeAreaName) and the selected item (GetSelectedItems).

Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
The source code files for this demo are installed (by default) in the following directory:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxFileManagerAndUploadDemos