ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

Implications of Multiple-Line Mode

Existing row-related properties, methods, and events fit well with the earlier definitions of records, rows, and lines (with two exceptions to be described later). For example:

·      The VisibleRows property returns the number of visible rows or records displayed on the grid—not the number of visible lines. If a row spans 2 lines, and the VisibleRows property is 5, then there are 10 visible lines displayed on the grid.

·      The RowTop method accepts a row number argument ranging from 0 to VisibleRows - 1. If a row spans 2 lines, then RowTop returns the position of the top of the third displayed row (that is, the fifth displayed line).

·      The RowResize event will be fired whenever a row is resized by the user at run time. In fact, at the record selector column, only row divider boundaries are displayed; thus, the user can only resize rows, not lines.

Other row-related properties, methods, and events can be interpreted similarly. There are two exceptions:

1.   The first is the RowHeight property. The RowHeight property returns the height of a cell or a line, not the height of a row. Changing this property would break users' existing code.

2.   The second is more of a limitation than an exception. Currently the dividers between rows and lines are the same. When the RowDivider object’s style property is changed, all dividers between rows and lines change to the same style. That is, different dividers cannot exist for rows and for lines.


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.