Spread 8.0 Documentation
SetCellDirtyFlag Method
Support Options
ActiveX Reference > ActiveX Methods > SetCellDirtyFlag Method

Glossary Item Box

SetCellDirtyFlag Method


See Also    Example

Applies To

fpSpread control

Description

Flags a cell or row in a bound fpSpread control whenever the data in the cell has changed.

Syntax

C++

BOOL CSpreadSheet::SetCellDirtyFlag (long Col, long Row, BOOL Dirty);

Visual Basic

fpSpread.SetCellDirtyFlag (ByVal Col As Long, ByVal Row As Long, ByVal Dirty As Boolean) As Boolean

Parameters

The following parameters are available:

Parameter Description
Col Column of cell to flag
(Set this value to –1 to flag the entire row.)
Row Row of cell to flag
Dirty True if the cell or row should be flagged; False if the cell or row should not be flagged

Remarks

This method flags new data in the sheet to be written to the database when either the active cell moves to another row and the DAutoSave property is set to True or, when the DAutoSave property is set to False and you call the DataSave method. If an entire row is flagged, all cells within that row are written to the database.

When the user changes the data in a cell, the sheet automatically sets the flag when the cell leaves edit mode. However, if the application changes data in a cell through properties, you must call this method if you want the data flagged to be saved.

This method is called for the current sheet setting unless you first set the Sheet property to specify the sheet with which you want to work.

If the DAutoSave property is set to True, once the active cell has moved to another row the Dirty parameter is set back to False and the cell is no longer marked to be saved. If the DAutoSave property is set to False, the Dirty parameter is set back to False and the cell is no longer marked to be saved after the data is saved to the database or when you call this method and set the Dirty parameter to False.

Return Type

True if successful; otherwise, False.

See Also

Monitoring Data Changes in the Sheet

DAutoSave, Sheet properties

DataSave, GetCellDirtyFlag methods

Copyright © GrapeCity, inc. All rights reserved.