▦K2 Advanced GridsDeveloper Portal / 0.23
Documentation / Grid layout

Horizontal & vertical scrolling

Expand a nine-column register into a readable seventeen-column business grid without widening the entire SmartForm.

Overview and prerequisites

Continue from Aggregation & Summary. Keep filtering, classic paging and KPI summary enabled. Add eight fields to the non-editable ListView in K2 Designer and save the form. Without horizontal scrolling, the standard table squeezes all seventeen columns into the available width.

Seventeen columns without horizontal scrolling
Figure 31 · Seventeen columns without horizontal scrolling · Actual K2 Runtime capture

Extend the ListView

The following is the actual column order used in the captured demo. Use the exact displayed headers in your configuration. The SmartObject already contains these properties.

ParameterType / examplePurpose
Order Number180 pxExisting field
Vendor Name240 pxExisting field
Department170 pxExisting field
Category180 pxNew field
Description350 pxNew field
Order Date150 pxExisting field
Expected Delivery180 pxNew field
Created On210 pxNew field
Quantity110 pxNew field
Order Amount170 pxExisting field
Budget Variance170 pxExisting field
Delivery Progress170 pxNew field
Currency100 pxNew field
Status190 pxExisting field
Is Approved130 pxExisting field
Is Urgent130 pxExisting field
Contact Time140 pxNew field

Quick start — horizontal scrolling

Replace defaults.horizontalScroll with this fragment; leave vertical scrolling and resizing disabled for the first test.

"horizontalScroll": {
    "enabled": true,
    "defaultColumnWidth": 150,
    "minColumnWidth": 60,
    "maxColumnWidth": 800,
    "columnWidths": {
        "Order Number": 180,
        "Vendor Name": 240,
        "Department": 170,
        "Category": 180,
        "Description": 350,
        "Order Date": 150,
        "Expected Delivery Date": 180,
        "Created On": 210,
        "Quantity": 110,
        "Order Amount": 170,
        "Budget Variance": 170,
        "Delivery Progress": 170,
        "Currency": 100,
        "Status": 190,
        "Is Approved": 130,
        "Is Urgent": 130,
        "Contact Time": 140
    }
}
Download horizontal scrolling configuration ↓
Required after saving a configuration file

Replace REPLACE_WITH_YOUR_AREAITEMID with your own ID (see Grid Discovery). Save the file and update configVersion in the Data Label loader, for example to 0.5.0 or another unused version. Save the form and reopen Runtime. Keep engineVersion unchanged unless the engine changes. Console-only experiments do not need a version change. If the downloaded filename differs, update the loader path or rename the file to purchase-orders.config.js.

Horizontal scroll — left edge
Figure 32 · Horizontal scroll — left edge · Actual K2 Runtime capture
Horizontal scroll — right edge
Figure 33 · Horizontal scroll — right edge · Actual K2 Runtime capture

Horizontal configuration reference

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.

Vertical scrolling

Enable a bounded scroll area and select 25 rows per page. Both scrollbars can operate together; KPI cards and pagination remain outside the scroll area in the demonstrated layout.

Object.assign(K2AdvancedGridsConfig.defaults.verticalScroll, {
    "enabled": true,
    "maxHeight": "400px",
    "stickyHeader": true
});
K2AdvancedGrids.instance.refresh();
Download vertical scrolling and sticky header configuration ↓
Required after saving a configuration file

Replace REPLACE_WITH_YOUR_AREAITEMID with your own ID (see Grid Discovery). Save the file and update configVersion in the Data Label loader, for example to 0.5.0 or another unused version. Save the form and reopen Runtime. Keep engineVersion unchanged unless the engine changes. Console-only experiments do not need a version change. If the downloaded filename differs, update the loader path or rename the file to purchase-orders.config.js.

Bounded table with 25 matching rows per page
Figure 34 · Bounded table with 25 matching rows per page · Actual K2 Runtime capture
Simultaneous horizontal and vertical scrolling
Figure 36 · Simultaneous horizontal and vertical scrolling · Actual K2 Runtime capture

Vertical configuration reference

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.

Interactive example

Offline simulation: scroll in both directions within the example. This is not K2 Runtime.

Order NumberVendor NameDepartmentCategoryDescriptionOrder DateExpected DeliveryCreated OnQuantityOrder Amount
PO-2026-00001Cedar ConsultingITOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 2026118169
PO-2026-00002Blue Horizon SuppliesOperationsOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 20262216338
PO-2026-00003Apex ServicesProcurementOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 20263324507
PO-2026-00004Cedar ConsultingITOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 20264432676
PO-2026-00005Blue Horizon SuppliesOperationsOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 20265540845
PO-2026-00006Apex ServicesProcurementOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 20266649014
PO-2026-00007Cedar ConsultingITOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 20267757183
PO-2026-00008Blue Horizon SuppliesOperationsOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 20268865352
PO-2026-00009Apex ServicesProcurementOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 20269973521
PO-2026-00010Cedar ConsultingITOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 202611081690
PO-2026-00011Blue Horizon SuppliesOperationsOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 202612189859
PO-2026-00012Apex ServicesProcurementOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 202613298028
PO-2026-00013Cedar ConsultingITOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 2026143106197
PO-2026-00014Blue Horizon SuppliesOperationsOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 2026154114366
PO-2026-00015Apex ServicesProcurementOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 2026165122535
PO-2026-00016Cedar ConsultingITOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 2026176130704
PO-2026-00017Blue Horizon SuppliesOperationsOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 2026187138873
PO-2026-00018Apex ServicesProcurementOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 2026198147042
PO-2026-00019Cedar ConsultingITOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 2026209155211
PO-2026-00020Blue Horizon SuppliesOperationsOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 2026220163380
PO-2026-00021Apex ServicesProcurementOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 2026231171549
PO-2026-00022Cedar ConsultingITOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 2026242179718
PO-2026-00023Blue Horizon SuppliesOperationsOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 2026253187887
PO-2026-00024Apex ServicesProcurementOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 2026264196056
PO-2026-00025Cedar ConsultingITOffice SuppliesSample purchase order description26 Oct 202629 Nov 202626 Oct 2026275204225

Advantages and limitations

More fields remain accessible without squeezing their widths. Scrolling does not virtualize rows, change the SQL query or reduce initial data loading. A scrollbar appears only when content exceeds its container. For temporary Console tests, shared defaults affect all grids without individual overrides. See Multiple ListViews for per-grid settings.

Enlarged screenshot