Override the _getRowDimInfo method of the Table Data Model.
/* This is a method override for the _getRowDimInfo method
* of the Table Data Model, which provides the table editor with
* the row dimension hierarchy information. Parameters passed
* to this method:
* 'level' - specifies the address of the row dimension being
* 'num_rows' - returns the number of rows that are present at
* the requested dimension.
* 'sub_rows' - returns whether the requested dimension has any
* 'height' - not used in this example.
* 'units' - not used in this example.
* 'groups' - not used in this example.
* 'eod' - not used in this example. */
GETRDIM: method level num_rows sub_rows width 8 units $ 4 groups 8 eod $ 1;
/* Determine the row level being requested and indicate:
* (1) How many rows (num_rows) the table has in this
* (2) Whether this dimension has subdimensions (sub_rows) */
len = listlen (level);
/* At the top level dimension, there are 2 rows and each row
* has subdimensions. */
if ( ^len ) then
num_rows = 2;
sub_rows = 1;
/* At the second-level dimension, there are 4 rows and with no
* subdimensions. */
num_rows = 4;
sub_rows = 0;