Del via


gridContext.addOnLoad (Klient-API-referanse)

Legger til hendelsesbehandlinger i hendelsen OnLoad for Subgrid .

Rutenetttyper som støttes

Skrivebeskyttede og redigerbare rutenett

Syntaks

gridContext.addOnLoad(myFunction);

Parameter

Name Type Kreves Description
myFunction funksjonsreferanse Ja Funksjonen som skal utføres når delnett lastes inn. Funksjonen legges til nederst i datasamlebåndet for hendelsesbehandling. Kjøringskonteksten sendes automatisk som den første parameteren til funksjonen. Se utføringskontekst for mer informasjon.

Merknader

Hvis du vil ha gridContextmer informasjon, kan du se Få rutenettkonteksten.

Eksempel

Legg til myContactsGridOnloadFunction-funksjonen i OnLoad-hendelsen for Kontakter-delnett.

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

removeOnLoad