Skip to main content

Initialization Javascript Function

Additionally to plug-in declarative attributes, some settings can be done via plug-in's "Initialization Javascript Function".

ParameterComponentDescriptionAvailable from
batchSizeGridDefine how many rows are loaded every time the next batch of data is requested (triggered on scroll event).
Defined value will only be used when next batch of data is requested, and NOT on initial load.
v23.2
resetConfigOnInitGridBy default, Sorting and Filtering used (defined by user) are kept for user's current session.
To reset Sort and Filter (on page load, before data gets loaded) regardless of the user's session, you can set this to "true".
v23.2
outsideClickDeselectsGridWhen enabled, clicking outside of the grid removes focus of the current cell. Without focus the arrow keys and other event listeners will not be active.v25.1
contextMenuPasteGridv25.1Enable pasting from the context menu. This only works if users accept the browser permission of reading the clipboard.
freezeColumnsStartGridv25.1Set amount of colums that shoud be freezes (sticky/fixed) at the start of the grid.

Note that this is currently in experimental support. It may not work optimal in combination with the saved reports feature.
trimSelectListChoicesGrid columnUsed with select list column.

By default, this is set to "true" - and it means: when a select list (with possible values) is opened, it's as wide as the column itself.
You can override this by setting "trimSelectListChoices" to "false". When "false", select list width is defined by the longest value in it.
v23.2
expectReturnValuesOnPasteGrid columnUsed with select list column.

By default, this is set to "false" - and it means: when pasting data from an external source (e.g. Excel or another Grid instance in the application), a DISPLAY value is expected.
You can override this by setting "expectReturnValuesOnPaste" to "true". When "true", Grid will expect the RETURN values to be pasted into given select list column.

This parameter is not used when copy-pasting data within single Grid instance.
v24.1
numberIncrementAutofillGrid columnEnable this on numerical columns to allow autofill (drag down column) to continue sequences (both arithmetic and geomeric). Like dragging down 1,2,3 will make the next values 4,5,6v25.1
autoselectOnlyValueOnCascadeGrid columnOnly applicable to Select List columns with an cascading parent.
If the parent get's changed, it looks at the new LOV result set and if there is only 1 result, it automatically selects this one.
v25.1
    function (pOptions) {
//Grid parameters
pOptions.batchSize = 20;
pOptions.resetConfigOnInit = true;
pOptions.outsideClickDeselects = true;
pOptions.contextMenuPaste = true;
pOptions.freezeColumnsStart = 1;

// Grid's select list column parameters
pOptions.columns['DEPTNO'] = {
trimSelectListChoices: false,
expectReturnValuesOnPaste: true,
autoselectOnlyValueOnCascade: true

};

// Grid's number column parameters
pOptions.columns['SAL'] = {
numberIncrementAutofill: true
}


return pOptions;
}