KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Controlling the number of Columns and Rows in the 4D View Pro Area
PRODUCT: 4D View Pro | VERSION: 18 R2 | PLATFORM: Mac & Win
Published On: May 7, 2020

When a new 4D View Pro document is created it will have 100 columns and 1000 row. If these numbers are too low or too high, 4D v18 R2 introduces two new commands to set the count for the columns and rows on a 4D View Pro document loaded into a 4D View Pro area individually. The commands are VP SET COLUMN COUNT and VP SET ROW COUNT. The commands are simple to use both using the same two parameters. The first parameter is the name of the 4D View Pro area object on a 4D form and the second parameter is the new number of columns or rows to set the document to.

This command will add or remove the items at the end and cannot add the items in the middle or at the start. If this is desired there is a different set if commands. To add columns or rows anywhere, the commands VP INSERT COLUMNS and VP INSERT ROWS can used and to remove the VP DELETE COLUMNS and VP DELETE ROWS commands can be used. All four of these four new commands also introduced in 4D v18 R2 take in one parameter a View Pro range object specifying which columns or rows and where to add them or remove them meaning columns and rows can be added or removed from anywhere in the existing sheet and not just the end.

If a column or row with data is removed, adding a column or row back will not restore the data so caution is advised when removing large numbers of columns or row from a document with data.