Gets the string identifier of the executed command.
Namespace: MindFusion.DataViews
File: EventArgs.js
JavaScript Copy Code |
---|
get commandName() {} |
String. The command name.
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; } |