Change Theme Settings
Change Theme Settings
Themes
 
Metropolis
Moderno
iOS
Material
Material Compact
Office 365
Mulberry
Show All Themes
v
...v

Custom Toolbar

  • RefreshRefresh
  • Thumbnails View
  • Details View
  •  
    ...
  • Collapse
    FolderFiles
    • Expand
      FolderDocuments
      • Expand
        FolderProjects
        • FolderTest project
        • FolderXml list
      • FolderReports
    • Expand
      FolderImages
      • 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).