Function: MnOnGridLoad
▸ MnOnGridLoad(controlName): (target: any, key: any, descriptor: PropertyDescriptor) => void
Decorator that marks a method as an event handler for grid load event.
This event is fired when a grid control is refreshed including when the user sort the values of a column.
Remarks
Available on pages: Record only.
Registration: Automatic registration at runtime.
For more information, see Microsoft Client API Reference
Example
Notify that the grid named "mysubgrid" is loaded
@MnComponent({
scope: {
pageType: "record",
table: "account"
}
})
export class NotifyGridLoadedComponent {
@MnOnGridLoad("mysubgrid")
onGridLoad(eventArg: FormEventArg) {
eventArg.formCtx.ui.setFormNotification("Grid loaded", "INFO", "gridLoaded");
}
}
Parameters
| Name | Type | Description |
|---|---|---|
controlName | ValueOrConfigPropertyMapper<string> | Name of the grid control or callback function that returns the name of the grid control from the component configuration. |
Returns
fn
▸ (target, key, descriptor): void
Parameters
| Name | Type |
|---|---|
target | any |
key | any |
descriptor | PropertyDescriptor |
Returns
void