Automatic modification of table height to fit the contents

1C Developer team

04.12.2018 6 min

We have implemented a new table display mode for situations when table height is determined by the content. This mode can be applied to all tables that are not associated with dynamic lists. For example, tabular sections, value tables, and value trees.

In the past, a table looked like this. One could specify either a fixed height for the table or stretch it vertically. As a result, an empty table has always been in its allotted space. And if the table only had a few rows, then after the last row, a rather large unused area remained.

ab464b8273f7f1e91b794c708065560b.png

Now an empty table takes only 3 rows, and when it is filled with three or more rows, there is no more empty space left at the bottom of the table.

bbb87d4743e9d1c5799f97aec1fa77ca.png

We envision two major scenarios involving the use of a new table view mode.

The simplest scenario is when you know in advance that the table will not consist of many rows and that they all will fit on the screen. Then you can disable vertical stretching and assign UseContentHeight value to the HeightControlVariant property. In this case, the empty table will have three rows, and every time when you add another row, the table will expand down.



A more complicated scenario is when there are typically not many rows in the table, but sometimes there can be a significant number of them. In this case, in addition to the first option, you will need to limit the maximum height of the table to keep it from ruining the form. To do this, you must disable the automatic calculation of maximum height and set MaxHeightInTableRows property to the maximum table height. Then, after reaching this value, the table will stop extending in height and will start to scroll down. In the following video, the maximum height of the table is 7 rows.



According to our estimates, this display mode is useful and convenient, but we have not yet changed the default table behavior. The new mode is not applied automatically when you design a form. Should you need it, you have to enable it manually.

This is due to the fact that we would like to analyze your feedback and user experience first. Based on the above, we will then decide, for which cases this mode should be set by default.

This is a preview of new functionality. We recommend that you do not use the content of this article as a practical guide to the new functionality. The new functionality will be fully described in the documentation to the relevant version of the software. You can find the complete list of changes in the V8Update.htm file.
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.