ComponentOne True DBGrid Pro 8
MultipleLines Property

Controls whether individual records span multiple lines.

Syntax

TDBGrid.MultipleLines = value

Values

Design Time

Run Time

0 - Disabled (default)

dbgMultipleDisabled

1 - Variable

dbgMultipleVariable

2 - Fixed

dbgMultipleFixed

Remarks

Read/Write at run time and design time.

This property determines whether a single row can span multiple lines. In this context, the terms line and row are defined as follows:

·      A line is a single physical row of cells displayed in a grid. Do not confuse this with a line of text inside a grid cell; depending upon the settings of the RowHeight and WrapText properties, data in a grid cell may be displayed in multiple lines of text.

·      A row displays a single record and may contain multiple lines or multiple physical rows.

The default value of MultipleLines is 0 - Disabled, which means that a single record (row) cannot span multiple lines. If necessary, the user can operate the horizontal scroll bar to view all of the columns within a row. This is how the grid normally displays data.

However, if the MultipleLines property is 1 - Variable or 2 - Fixed, then a single record (row) may span multiple lines. This feature enables the user to view simultaneously all of the columns (fields) of a record within the width of the grid without scrolling horizontally.

When the MultipleLines property is changed to a value other than 0 - Disabled, the horizontal scroll bar will be hidden if present, regardless of the setting of the ScrollBars property. The grid will automatically span or wrap the columns to multiple lines so that all columns will be visible within the width of the grid. If the resulting column layout is not to your liking, you can adjust it at design time or run time by changing the widths and orders of the columns.

If MultipleLines is 1 - Variable, then changing the width of individual columns or the width of the grid itself may cause one or more columns to be shifted to a different line, which may in turn affect the number of lines displayed in a physical row. For example, enlarging a column may bump the next one onto a different line, while shrinking the width of the grid may produce additional lines.

If MultipleLines is 2 - Fixed, then changing the width of individual columns or the width of the grid itself preserves both the current column breaks and the number of lines displayed in a physical row. In this case, enlarging a column reduces the width of its successors, while shrinking the width of the grid may hide the rightmost columns altogether.

At design time, if the ScrollBars property is set to 4 - Automatic, and the MultipleLines property is enabled, a vertical scroll bar appears even though no data is displayed. This is done so that you can take the width of the scroll bar into account when adjusting columns at design time.

Note

Prior to version 6.0, the MultipleLines property was implemented as a Boolean, with False meaning 0 - Disabled, and True meaning 1 - Variable. The setting 2 - Fixed was added to preserve column breaks.

See Also

TDBGrid Control

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback