RowStatus Property

Returns or sets a value that indicates whether a row has been added, deleted, or modified.

Syntax

[form!]VSFlexGrid.RowStatus(Row As Long)[ = RowStatusSettings ]

Remarks

The RowStatus property is set by the control to reflect the status of the row. This allows you to determine whether a row has just been created, whether it was modified by the program itself, or whether it was edited by the user.

The control automatically assigns the following values to each row:

 

Constant

Value

Description

flexrsNew

0

When the row is created.

flexrsUpdated

1

When the program modifies a row by writing to it.

flexrsModified

2

When the user modifies a row by editing it.

flexrsDeleted

3

Not assigned by the control, but used as a return value if you request the status of a row that does not exist (for example, RowStatus(-1)).

 

Each new action updates the row status and replaces the previous value. For example, if you create a new instance of the control, all rows will have RowStatus set to flexrsNew (0). If you then assign values to one of the rows, its status will become flexrsUpdated (1). If the user then edits one or more values on this row, the status becomes flexrsModified (2).

The RowStatus property is read/write, so you may define and assign your own constants to it. If you do so, define your own enumeration and use values above 100 to avoid conflict with the control-defined constants and future values that may be added in future releases of the control.

Data Type

RowStatusSettings (Enumeration)

See Also

VSFlexGrid Control