The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientFileManager.CustomCommand Event

Fires when a custom item is clicked, allowing you to perform custom actions.


CustomCommand: ASPxClientEvent<ASPxClientFileManagerCustomCommandEventHandler<ASPxClientFileManager>>

Event Data

The CustomCommand event handler receives an argument of the ASPxClientFileManagerCustomCommandEventArgs type. The following properties provide information specific to this event.

Property Description
commandName Gets the name of the processed command.


When a custom item is clicked, the CustomCommand event is raised, allowing you to perform custom actions. You can use the event argument's ASPxClientFileManagerCustomCommandEventArgs.commandName parameter to identify a clicked button by its command name (FileManagerToolbarCustomButton.CommandName).

To learn more about toolbar items, see the Toolbar topic.


The code sample below demonstrates how to implement two custom toolbar buttons. The complete sample is available in the DevExpress online demo File Manager - Custom Toolbar.


<dx:ASPxFileManager ID="FileManager" ClientInstanceName="FileManager" runat="server" OnCustomCallback="ASPxFileManager_CustomCallback">
     <ClientSideEvents CustomCommand="OnCustomCommand"/>
               <dx:FileManagerToolbarCustomButton Text="Thumbnails View" CommandName="ChangeView-Thumbnails" GroupName="ViewMode">
                    <Image IconID="grid_cards_16x16" />
               <dx:FileManagerToolbarCustomButton Text="Details View" CommandName="ChangeView-Details" GroupName="ViewMode">
                    <Image IconID="grid_grid_16x16" />
protected void ASPxFileManager_CustomCallback(object source, CallbackEventArgsBase e) {
     CurrentView = (FileListView)Enum.Parse(typeof(FileListView), e.Parameter.ToString());
function OnCustomCommand(s, e) {
     switch(e.commandName) {
          case "ChangeView-Thumbnails":
          case "ChangeView-Details":
See Also