onAction - event of the PmfTable object
Description:
The event is triggered when an important logical action happens over the object.
Parameters:
| ev | (Object) Reference to an object that describes information about the event
Parameters:
| ev.SrcObject | (Object) Pmf object where the event originated. |
| ev.Action | (String) Action type.
"main" - left mouse button double-click or on release of the "space" or "Enter" key over the table. |
| ev.Area | (Long) The numeric identifier of the table area where the action was executed. See Areas in the table. |
| ev.Row | (Long) Row index of the table where the action was executed. |
| ev.Col | (Long) Column index of the table where the action was executed. If SelType = "row" and the action was initiated by the "space" or "Enter" then ev.Col = -1. |
|---|
|
|---|
Note:
This event is is functional only in
JavaScript language.
Example:
JavaScriptSelect and copy to clipboard
var oForm = pMe.Form;
var oTable = oForm.CreateItem("table", "id_tab1");
oTable.InitRows(5, 1, 1);
oTable.InitCols(6, 1);
// ... Additional table settings
// The function is registered into the onAction event.
function onTableAction(ev)
{
if (ev.Action == "main")
{
Pm.Debug("Area=" + ev.Area + ", Row=" + ev.Row);
}
}
oTable.AddEvent("onAction", "Id_Edit", onTableAction);