Search
Command Class
See Also
 






A base class for grid row commands.

Namespace: MindFusion.DataViews
File: Command.js

 Syntax

JavaScript  Copy Code

// class
Command.prototype = {}

 Example

The following code extens the Command class to implement a delete command that shows a confirmation dialog:

JavaScript  Copy Code

// define a delete command, that shows a confirmation dialog before deleting the record
class ConfirmDeleteCommand extends dv.Command
{
    static get name() { return "Delete"; }

    static createControl(sender, args)
    {
        var control = document.createElement("button");
        control.innerHTML = "Delete";
        if (args.row === editRow)
            control.style.display = "none";
        return control;
    }
}

 Inheritance Hierarchy

MindFusion.DataViews.Command

 See Also