Skip to main content

ASPxClientSpreadsheetCustomCommandExecutedEventArgs.commandName Property

Gets the name of the processed command. Corresponds to the item’s Name property value.

Declaration

commandName: string

Property Value

Type Description
string

A string value representing the processed command’s name.

Remarks

Use the commandName property to identify the custom command currently being processed. The property returns the Name property value of the corresponding item.

<dx:ASPxSpreadsheet ID="Spreadsheet" runat="server" ShowConfirmOnLosingChanges="False">
       <ClientSideEvents CustomCommandExecuted="onCustomCommand" />
    <RibbonTabs>
        <dx:SRHomeTab>
            <Groups>
                <dx:RibbonGroup Name="Group1" Text="Group1">
                    <Items>
                        <dx:RibbonButtonItem Name="MyButton1" Text="Button1" />
                        <dx:RibbonButtonItem Name="MyButton2" Text="Button2" />
                    </Items>
                </dx:RibbonGroup>
            </Groups>
        </dx:SRHomeTab>
    </RibbonTabs>
<%-- ... --%>
function onCustomCommand(s,e) {
    console.log(e.commandName); // prints "MyButton1" for the first item and "MyButton2" for the second
}
See Also