▦K2 Advanced GridsDeveloper Portal / 0.23
Documentation / Developer reference

Configuration reference

Technical reference for the frozen Engine 1.0.0-beta.1.0. Use this page to find configuration options without repeating the training course.

Values shown in lesson examples are not necessarily engine defaults. Modules normally require explicit enabled: true; filtering is enabled unless explicitly false. All settings apply to loaded Runtime records, not the entire database.

Configuration structure and grid selection

ParameterType / behavior
languageString: auto, en, ar; localization.language takes precedence.
localizationObject; language, languages, defaultLanguage and fallbackLanguage. See the Localization & RTL reference.
defaultsObject: shared settings for matching grids.
gridsArray of grid entries. A grid without a matching entry is not enhanced.
grids[].areaItemIdString: exact Runtime area ID; highest selection priority.
grids[].runtimeNameString: exact Runtime name; second priority.
grids[].viewDefinitionIdString: view definition ID; fallback selection.
grids[].enabledBoolean: false disables the selected grid; otherwise enabled.
window.K2AdvancedGridsConfig = {
  language: "auto",
  defaults: { filtering: { enabled: true } },
  grids: [
    { areaItemId: "REPLACE_WITH_YOUR_AREAITEMID", enabled: true,
      pagination: { enabled: true, pageSize: 25 } }
  ]
};
window.K2GridFiltersConfig = window.K2AdvancedGridsConfig;

Inheritance and overrides

The first matching areaItemId wins, then the first matching runtimeName, then the first remaining matching entry. Entries are not combined. Defaults and the selected entry are shallow-merged, with explicit merges for each supported module. The following nested objects are also merged one level: export.csv, export.excel, cardView.layout, cardView.mapping, dataVisualization.columns, booleanFormatting.columns, horizontalScroll.columnWidths, columnManagement.visibility and pagination.labels. Individual column settings inside a merged map are replaced, not recursively merged. Arrays are replaced, not appended. Root defaults.columns is replaced as a whole by a grid-level columns object.

Prefer unique areaItemId selectors. For column references, use the stable discovered identifier where possible; many modules also accept column names or titles, but exact map lookups are case-sensitive. Avoid duplicate captions.

See Multiple ListViews and Grid discovery. Update the loader configVersion after saving a server configuration. Saved preferences can override initial layout settings; reset the relevant grid preferences to retest defaults.

Filtering and active filters

Examples and Runtime validation: Advanced filtering.

ParameterType / fallbackEffect
filtering.enabledBoolean / true unless falseEnable filter controls and filtering
activeFilters.enabledBoolean / false unless trueDisplay active filter chips
activeFilters.maxValuesPositive integer / 3Maximum category values displayed before abbreviated label
showRecordCountBoolean / true unless falseShow counter when paging is disabled
showClearAllBoolean / true unless falseShow clear-all action
autoDetectTypesBoolean / true unless falseInfer type from K2 runtime metadata
textModecategory | text / categoryDefault mode for Text fields
columns[identifier].modecategory | textOverride Text field mode
columns[identifier].typeSupported normalized type nameOverride detected type
columns[identifier].enabledBoolean / true unless falseExclude column from filter model
language (root)auto | en | ar / autoChoose built-in UI language

Supported normalized types: autoguid, autonumber, date, datetime, decimal, guid, memo, number, text, time, yesno. preserveOnRefresh: false at grid/defaults level clears filter state on detected refresh. filtering.enabled: false removes the filtering model and clears filters.

pagination

Examples and Runtime validation: Pagination & Load More.

ParameterType / lesson valueBehavior
enabledBoolean / trueEnable client-side pagination.
modeclassic | loadMore / classicNumbered pages or progressive display.
pageSizePositive integer / 10Initial rows per page or batch.
pageSizeOptionsInteger array / [10,25,50,100]Options in the page-size selector.
allowPageSizeChangeBoolean / trueShow the selector.
showRecordCountBoolean / trueShow loaded and matching record counts.
showPageCountBoolean / trueShow page count in Classic mode.
showFirstLastButtonsBoolean / trueShow first/last buttons in Classic mode.
resetOnFilterBoolean / trueReset page or batch limit when filters change.
preserveOnRefreshBoolean / trueRetain page state when the grid element is replaced during refresh, subject to available records.

Pagination is off unless enabled explicitly; mode falls back to classic, page size to 10. labels overrides localized pagination text.

aggregation

Examples and Runtime validation: Aggregation & Summary.

MetricLoadedFilteredPage 1Page 2
Count25014104
Sum29,401,126.091,972,616.041,292,840.03679,776.01
Average117,604.50140,901.15129,284.00169,944.00
Variance3,745.0013,909.7011,099.102,810.60
ParameterType / allowed valuesBehavior
enabledBoolean; true enablesOtherwise summary is disabled
scopeloaded / filtered / pageLoaded rows, matching rows, or displayed page; fallback filtered
positiontop / bottomFallback bottom
layoutkpi / compact / columnsFallback compact; cards use compact instead of columns
alignmentstart / center / endFallback end
showTitleBooleanOnly true shows Summary
showScopeBooleanOnly true shows scope label
showLabelsBooleanShown unless false
showSeparatorsBooleanEnabled only when true
itemsArrayMetric definitions
items[].columnStringColumn key, name or title; omit for record count
items[].operationcount / countDistinct / sum / avg / min / maxDefaults to count
items[].labelStringOptional custom metric label
items[].precisionInteger 0–12Decimal and average default 2; other numeric operations default 0
items[].prefix / suffixStringOptional display text
items[].fontWeight400 / 500 / 600 / 700 / 800Fallback 600

horizontalScroll / verticalScroll

Examples and Runtime validation: Horizontal & vertical scrolling.

ParameterType / examplePurpose
enabledboolean / trueEnable horizontal overflow and explicit widths.
defaultColumnWidthpositive integer / 150Fallback width in pixels.
minColumnWidthpositive integer / 60Lower bound in pixels.
maxColumnWidthpositive integer / 800Upper bound in pixels.
columnWidthsobject / header: widthPer-column width in pixels, by header or column key.
ParameterType / examplePurpose
enabledboolean / trueEnable vertical overflow.
maxHeightCSS length / 400pxMaximum scroll area height. Supports px, rem, em, vh, dvh and %. Invalid values fall back to 400px.
stickyHeaderboolean / trueKeep header visible during vertical scrolling.

columnResize

Examples and Runtime validation: Column resizing & AutoFit.

ParameterType / examplePurpose
enabledboolean / trueEnable resizing.
minWidthpositive integer / 60Minimum resize width in pixels, constrained by horizontal settings.
maxWidthpositive integer / 800Maximum resize width in pixels, constrained by horizontal settings.
handleWidthpositive integer / 6Boundary hit area in pixels; engine clamps hit radius.
fullHeightHandleboolean / trueAllow interaction along the visible column body.
highlightOnHoverboolean / trueShow the indicator on hover.
indicatorColorCSS color / autoAuto uses theme accent or fallback blue.
indicatorWidthpositive integer / 2Indicator thickness, clamped to 1–8 px.
autoFitOnDoubleClickboolean / trueEnable double-click AutoFit.

Requires horizontalScroll.enabled: true. The optional preserveOnRefresh: false resets the corresponding state on detected row replacement.

columnManagement

Examples and Runtime validation: Column visibility.

ParameterValue in lessonBehavior
enabledtrueEnable management
showToolbarButtontrueShow toolbar entry
enableHeaderContextMenutrueEnable right-click header menu
visibility.enabledtrueEnable visibility controls
visibility.requiredColumnsOrder NumberCannot be hidden
visibility.hiddenByDefault[]Initial hidden columns
visibility.preserveHiddenFilterstrueFalse clears filters on hidden columns

visibility.preserveOnRefresh: false resets hidden-column state on detected row replacement. At least one column stays visible.

columnPinning

Examples and Runtime validation: Column pinning.

Order NumberVendorDepartmentDescriptionOrder AmountStatus
PO-2026-00001Apex ServicesProcurementPurchase order for business supplies8,169.00Pending Approval
PO-2026-00002Cedar ConsultingITPurchase order for business supplies16,088.00Cancelled
PO-2026-00003Blue HorizonOperationsPurchase order for business supplies24,007.00Approved

Requires horizontalScroll.enabled: true. The optional preserveOnRefresh: false resets the corresponding state on detected row replacement.

columnReordering

Examples and Runtime validation: Column reordering.

ParameterValue in lessonBehavior
enabledtrueEnable reordering
allowUserReorderingtrueAllow runtime movement
initialOrder[]Initial priority order; omitted columns are appended

Requires horizontalScroll.enabled: true. The optional preserveOnRefresh: false resets the corresponding state on detected row replacement.

preferences

Examples and Runtime validation: Personal preferences.

ParameterValue in lessonBehavior
enabledtrueEnable preferences
namespaceK2AdvancedGridsStorage namespace
allowBrowserScopetrueAllow storage without userKey
userKeyoptionalProvide stable user-specific identifier to separate users
saveVisibilitytrueStore hidden columns
saveOrdertrueStore column order
savePinningtrueStore pins
saveWidthstrueStore resized widths
savePageSizetrueStore page size

Preferences require enabled: true and either userKey or allowBrowserScope: true. Storage is browser-local; key includes namespace, pathname, user/browser scope, area ID and definition ID. Grouping and card mode can also be persisted.

booleanFormatting

Examples and Runtime validation: Boolean formatting.

ParameterBehavior
enabledEnable the module or override per column.
modeicon, checkbox, text, badge
alignmentstart, center, end
iconSizeClamped to 10–48 pixels.
trueText / falseTextauto uses localized Yes/No; or custom labels.
nullTextDefault em dash.
trueColor / falseColorauto or valid CSS color.
columnsOverrides by column key, name or title.

conditionalFormatting

Examples and Runtime validation: Conditional formatting.

ParameterBehavior
enabled / rulesEnable module and declare rules; individual enabled:false skips a rule.
column / targetColumnCondition column; optional separate cell target.
targetrow or cell (default cell).
operatoreq, ne, gt, ge, lt, le, between, blank, notblank, in, notin, contains, notcontains, starts, ends, beforetoday, aftertoday, today.
value / valueToComparison operand(s); between also accepts a two-element array. in/notin require arrays.
conditions / logicNested conditions; or means any; otherwise all (AND). Empty conditions do not match.
priorityHigher numeric priority first; equal priority follows declaration order.
stopIfTrueStop processing further rules for that row after a match.
stylebackground, color, fontWeight, fontStyle, textDecoration, badge, alignment.

dataVisualization

Examples and Runtime validation: Data bars & color scales.

ParameterBehavior
enabledModule must be true; per-column false skips that column.
columnsMap of column keys, names or titles; numeric types only.
modebar or scale.
scopeloaded (default) or filtered; per-column setting overrides module.
min / maxOptional numeric bounds; missing bar bounds include zero. Scale bounds use data extent. Equal bounds produce a midpoint scale and no bar.
positiveColor / negativeColorColors for positive and negative bars.
showZeroAxisDefaults to on for ranges crossing zero.
opacity0–1; clamped; default 0.25.
minColor / midColor / maxColorScale colors; midColor:false selects two colors.

cellMerging

Examples and Runtime validation: Cell merging.

ParameterMeaning
enabledtrue enables merging
columnsOrdered array of column titles or matching identifiers
hierarchicalfalse uses independent keys; otherwise prefix keys
mergeEmptytrue allows empty values to participate
verticalAlignmenttop / center / bottom; center fallback
horizontalAlignmentstart / center / end; center fallback
backgroundCSS color or auto / theme fallback
borderColorCSS color or auto / theme fallback
showGroupBordersfalse removes group borders

rowGrouping

Examples and Runtime validation: Row grouping.

ParameterMeaning
enabledEnables row grouping
columnsOrdered array of column titles; each entry adds a level
allowUserGroupingAllows grouping commands in the header menu
collapsedByDefaultInitial collapsed state
showGroupingBarDisplays grouping chips and controls
showRecordCountDisplays the matching count per group
showExpandCollapseAllDisplays the global expand and collapse controls
aggregatesArray of aggregate definitions: column, operation, label and precision in these examples

preserveOnRefresh: false resets grouping on detected row replacement; preserveInPreferences: false excludes it from preference persistence. Active grouping suppresses cell merging. Group counts refer to matching records, not only the current page.

rowContextMenu

Examples and Runtime validation: Row context menus and actions.

ButtonSystem name used in examples
View DetailsViewDetails_ToolBarButton
Edit OrderEditOrder_ToolBarButton
View HistoryViewHistory_ToolBarButton
View AttachmentsViewAttachments_ToolBarButton
Cancel OrderCancelOrder_ToolBarButton

cardView

Examples and Runtime validation: Card view.

ParameterMeaning
enabledEnable Card View
defaultModetable or cards
allowUserSwitch / showToolbarButtonAllow mode switching and show toolbar selector
layout.columnsauto or a configured column count
layout.minCardWidth / maxCardWidthCard width bounds
layout.gap / densitySpacing and comfortable or compact density
mapping.title / subtitle / body / footerSource column names for card regions
mapping.linkText / linkButtonLink label and native Toolbar Button name
mapping.linkUrlColumnOptional source column for a URL link
fieldsOrdered additional field definitions: column, label, format and precision where applicable
preserveInPreferencesSave selected mode when preferences are enabled

Default mode falls back to table. The card switch is hidden when allowUserSwitch or showToolbarButton is false. Table headers remain available in Cards for filtering in this beta.

export

See CSV export and Native Excel export.

ParameterType / behavior
enabledBoolean; explicit true required.
showToolbarButtonBoolean; shown unless false.
allowUserOptionsBoolean; false downloads immediately using configured defaults.
defaultFormatxlsx (fallback) or csv.
defaultScopefiltered (fallback), loaded, page.
defaultColumnsvisible (fallback), all.
preserveColumnOrderBoolean; unless false, uses current order and pin zones.
fileNameString; fallback Export.
appendTimestampBoolean; true unless false; UTC timestamp.
includeSummaryBoolean; Excel Summary worksheet option.
includeGroupingBoolean; Excel Groups worksheet option.
includeFormattingBoolean; Excel formatting option.
csv.delimiterComma (fallback), semicolon, tab or pipe.
csv.includeBOMBoolean; true unless false.
excel.sheetNameString; Data fallback.
excel.freezeHeaderBoolean; freeze header option.
excel.freezePinnedBoolean; freeze leading pinned columns option.
excel.autoFitColumnsBoolean; calculated column widths option.
excel.autoFilterBoolean; native Excel filter option.
excel.nativeConditionalFormattingBoolean; explicitly enable native Excel bars and scales.

CSV produces a flat data file; formatting, summary worksheets and group worksheets are XLSX features. Native Excel visualizations are not pixel-identical to Runtime. Protected View is controlled by Office security settings.

Configuration examples and validation

Use the cumulative configurations from the training articles as working starting points, not as a schema that enables every feature automatically. The following complete examples include the required configuration alias and a placeholder grid identifier.

purchase-orders.config.js

purchase-orders-export-visualization.config.js

purchase-orders-card-grouped.config.js

console.table(K2AdvancedGrids.discover());
console.log(K2AdvancedGrids.instance.inspect());

After changing configuration, verify that the selected grid is discovered, that its expected modules are active, and that there are no initialization errors. Do not treat client-side hiding or action availability as an authorization boundary. The underlying K2 rules and data access must enforce permissions.

Reference scope: this first reference consolidates the verified lesson options and audited configuration resolution in Beta 1.0. It is not an exhaustive formal schema for every internal or undocumented engine option; nested rule and card examples remain linked to their lessons. The remaining Developer Reference articles will extend the technical coverage.

Enlarged screenshot