Nóta
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað aðskrá þig inn eða breyta skráasöfnum.
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað að breyta skráasöfnum.
Adds event handlers to the Subgrid OnLoad event event.
Grid types supported
Read-only and editable grids
Syntax
gridContext.addOnLoad(myFunction);
Parameter
| Name | Type | Required | Description |
|---|---|---|---|
myFunction |
function reference | Yes | The function to be executed when the subgrid loads. The function will be added to the bottom of the event handler pipeline. The execution context is automatically passed as the first parameter to the function. See execution context for more information. |
Remarks
To get the gridContext, see Getting the grid context.
Example
Add the myContactsGridOnloadFunction function to the Contacts subgrid OnLoad event.
function myFunction(executionContext) {
let formContext = executionContext.getFormContext(); // get the form context
let gridContext = formContext.getControl("Contacts");// get the grid context
let myContactsGridOnloadFunction = function () { console.log("Contacts Subgrid OnLoad event occurred") };
gridContext.addOnLoad(myContactsGridOnloadFunction);
}