Search
CommandEventArgs.control Property
See Also
 






Gets the controller that triggered the command.

Namespace: MindFusion.DataViews
File: EventArgs.js

 Syntax

JavaScript  Copy Code

get control() {}

 Property Value

HTMLElement. The HTML control.

 Example

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;         
}

 See Also