Search
CommandEventArgs.commandName Property
See Also
 






Gets the string identifier of the executed command.

Namespace: MindFusion.DataViews
File: EventArgs.js

 Syntax

JavaScript  Copy Code

get commandName() {}

 Property Value

String. The command name.

 Example

The following code handles the rowCommand event of a grid. The event data is provided by the CommandEventArgs class. The name of the command is "Delete":

JavaScript  Copy Code
grid.rowCommand.addEventListener(function (sender, args)
{
    if (args.commandName == "Delete")
    {       
         ui.Dialogs.showConfirmDialog("Confirm", "Delete record?", function (result)
         {
             if (result == ui.ModalResult.OK)
             {
                 grid.removeRows(this.row);
             }
         }.bind(args), sender.element, grid.theme);
         args.cancel = true;         
}

 See Also