Initialization Javascript Function
Additionally to plug-in declarative attributes, some settings can be done via plug-in's "Initialization Javascript Function".
Parameter | Component | Description | Available from |
---|---|---|---|
batchSize | Grid | Define 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 |
resetConfigOnInit | Grid | By 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 |
outsideClickDeselects | Grid | When 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 |
contextMenuPaste | Grid | v25.1 | Enable pasting from the context menu. This only works if users accept the browser permission of reading the clipboard. |
freezeColumnsStart | Grid | v25.1 | Set 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. |
trimSelectListChoices | Grid column | Used 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 |
expectReturnValuesOnPaste | Grid column | Used 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 |
numberIncrementAutofill | Grid column | Enable 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,6 | v25.1 |
autoselectOnlyValueOnCascade | Grid column | Only 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;
}