CodeCharge Studio
NumberOfColumns Run-Time Property (ASP)
Applies to
Directory Form
Type
number
Access
read/write
Syntax
object.NumberOfColumns [=value]
Description
This property contains the number of columns the directory should be split into.
Depending on the property's value, categories are split into a number of columns
containing similar number of categories.
This property can be used to enable directory layout selection depending on
user's preference or on the total number of categories.
Example
The following example sets the number of columns depending on the number of subcategories
listed by the directory. The number of columns is increased with each 50 subcategories
listed. Actual number of columns depends on the number of categories. There cannot
be more columns than categories.
The example assumes Directory1 form exists. The code can be put
into directory's Before Show event.
Directory1.NumberOfColumns = Directory1.Recordset.RecordCount \ 50
See also
NumberOfSubCategories Property
Recordset.RecordCount Property
Change Number Of Columns Action
On-line, printable versions and updates