Skip to Main Content
Status Released
Workspace Natural for Ajax
Created by Alexander Büning
Created on Jun 13, 2022

Need a method to fix horizontally scrollable columns of a table at runtime

With SI-466430 we have received a fix to statically exclude 1-n columns from being scrolled horizontally. These columns remain in position and only columns positionned right of them are horizontally scrollable. This solution is already very helpful in large table with many columns, However, the solution is static because specific additional stylesheets need to be applied at design design und users cannot select at runtime whether and which columns to fix.

We would largely prefer a dynamic solution where user can select at runtime which and how many rows remain fixed. Possibly this could be achieved by providing a new property for gridcol headers of specific columns or with a general new property in rowtablearea section e.g. "withhorizontalcolumnfixing=true|false" (false by default).

If the entry is general, then any 1-N columns could be fixed e.g. by simply RIGHT clicking in the header on the last column on the right to fix (so left clicking for sorting, right clicking for fixing). In such scenario all the columns left of the selected column + the selected columns will be fixed. Another right click in the header of the very same last column to fix would dissolve the fixation entirely. A right click in a different column header would replace the previous selection of columns to fix.

Whereas above method for dynamically selecting a range of columns appears very flexible and probably intutive to use, there might be other scenarios where - at least by default - a certain numbers of columns should be fixed after initialization of the table automatically. Possibly with a property in rowtablearea section such as "columnstofixhorizontally=x", where x stands for the number of columns to fix including the first one, this couold be achieved. If such fixation is applied by default then the optional "withhorizontalcolumnfixing=true|false" will determine whether the default fixation can be changed or not. Only in case of "withhorizontalrowfixing=true" users could apply a different range of columns to fix or to dissolve/cancel the fixation if not desired.

In terms of visual appearance it appears useful to indicate - at least optionally - to the users whether and which columns are fixed. Similar to MS Excel this could be indicated by a bold black vertical line right of the last column that is fixed or it could be indicated in all or just the last column header by an additional small icon (similar to sort icon a fixation icon - maybe an anchor symbol in the right edge of column header. If the anchor is shown then it means the column is fixed / all the left columns are fixed). The visual hint could be displayed/not displayed thanks to additional property such as "withcolumnfixationicon=true|false".