ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

Specifying Cell Status Values

True DBGrid recognizes 16 distinct cell status values that are used in code to indicate the disposition of a cell. A cell status value is a combination of four separate conditions.  These conditions are enumerations which have the flag attribute, which means that they can be combined with the Or operator:

Current Cell

The cell is the current cell as specified by the Bookmark, Col, and SplitIndex properties. At any given time, only one cell can have this status. When the floating editor MarqueeStyle property setting is in effect, this condition is ignored.

Marquee Row

The cell is part of a highlighted row marquee. When the MarqueeStyle property indicates that the entire current row is to be highlighted, all visible cells in the current row have this additional condition set.

Updated Cell

The cell contents have been modified by the user but not yet written to the database. This condition is also set when cell contents have been modified in code with the Text or Value properties.

Selected Row

The cell is part of a row selected by the user or in code. The SelectedRowCollection contains a bookmark for each selected row.

True DBGrid defines the following constants corresponding to these cell conditions:

CellStyleFlag.CurrentCell

Applies to the current cell.

CellStyleFlag.MarqueeRow

Applies to cells in a highlighted row marquee.

CellStyleFlag.UpdatedCell

Applies to cells that have been modified.

CellStyleFlag.SelectedRow

Applies to cells in a selected row.

True DBGrid also defines the following constants, which are not meant to be combined with those listed earlier:

CellStyleFlag.AllCells

Applies to all cells.

CellStyleFlag.NormalCell

Applies to cells without status conditions.

Use CellStyleFlag.AllCells to refer to all cells regardless of status. Use CellStyleFlag.NormalCell to refer to only those cells without any of the four basic cell conditions described earlier.


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