Controls operations are triggered by operation buttons, that is, by cliccable dom nodes with a data-operatinion="operation_name arg1 arg2...". Row buttons are automatically created by default templates according to the specifications provided in the operations row-type attribute. Buttons placed in toolbars such as the add new item button of a grid must be created manually.

No event handler is attached directly to buttons, so they work immediately also when they are rendered dynamically. There are just a few handlers attached directly to the document that handle all Mvc Controls Toolkit controls, by exploiting event bubbling.

Below all button operations supported up to now by at least one control.

add append|prepend|after|before [row-index]
It adds a new item in line in a collection control (like a grid, for instance). after|before may be used just when the button is on a data item, and cause the new item be added after|before the data item whose button was clicked. row-index is the index of the row-type whose specifications will be used to create the new item. If row-index is not provided, the new item will have the same row-type of the the data item whose button was clicked. append|prepend are used when the button is placed in a toolbar, and cause the new item be appended/prepended to all others. If row-index is not provided 0 (that is the main row) is assumed. append|prepend may be processed also if the button is placed out of the control, but in this case the button must contain a data-target attribute whose value is the id of the control to be processed.
add-detail append|prepend|after|before [row-index]
Works as add but new record is edited in a modal window.
It deletes the data item whose button was clicked.
It shows in detail display only mode the data item whose button was clicked.
It moves the data item whose button was clicked from display mode to edit mode.
It opens a modal to edit the data item whose button was clicked in detail mode.
It saves changes to the data item being edited to the server, and if edit took place in a modal it closes the modal, too. In case of detail mode editing, this button must be placed in the form of the modal window.
It undo the data item whose button was clicked and, if in edit mode, moves back to display mode
It closes a modal window opened to show/edit a data item in detail mode. This button must be placed withing the modal window.

Fork me on GitHub