Gets the controller that triggered the command.
Namespace: MindFusion.DataViews
File: EventArgs.js
JavaScript Copy Code |
---|
get control() {} |
HTMLElement. The HTML control.
The following code handles the rowCommand event of a grid. The code uses the control property to check the id of the HTML element that triggered the command:
JavaScript Copy Code |
---|
grid.rowCommand.addEventListener(function (sender, args) { if (args.control.id == "delButton") { 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; } |