Spread 8.0 Documentation
DataFill, ScriptDataFill Events
Support Options
ActiveX Reference > ActiveX Events > DataFill, ScriptDataFill Events

Glossary Item Box

DataFill, ScriptDataFill Events


See Also

Applies To

fpSpread control

Description

Occurs for each cell in the fpSpread control before it receives data from the database and before it writes data to the database, if the DataFillEvent property is set to True for the cell.

Syntax

C++

afx_msg void OnDataFillfpSpread(UINT, int, CWnd*, LPVOID);

Visual Basic

Sub fpSpread_DataFill(ByVal Col As Long, ByVal Row As Long, ByVal DataType As Integer, ByVal fGetData As Integer, Cancel As Integer)

Note: The ScriptDataFill event uses the same syntax except event parameters that are not passed "ByVal" are declared as variants. For more information on Script events, see Scripting Environment Usage.

Parameters

The following parameters are available:

Parameter Description
Col Column number of cell assigned data
Row Row number of cell assigned data
DataType Data type as defined by the database
(See the DataColConfig event for a table of data types.)
fGetData True if the fpSpread control is retrieving data; False if data is being written to the database
Cancel Set to True to prevent default processing
(The fpSpread control will not automatically read or write data.)

Remarks

This event occurs for bound fpSpread controls. This event occurs only for cells whose column has the DataFillEvent property set to True.

For each cell, this event occurs before data is assigned to the specified cell in the fpSpread control and before the fpSpread control writes data from the cell to the database, so the application can provide special formatting.

To retrieve the value of the data being assigned to the cell, use the GetDataFillData method. To modify the data being written to the database, use the SetDataFillData method.

The DataType parameter represents the data access type. The VarType parameter for the GetDataFillData method represent a variant data type. These parameter values are not equivalent. For example, the DataFill event would return a value of 4 in the DataType parameter for a long integer. For the GetDataFillData method, the variant data type for a long integer is represented by a value of 3.

Use the SheetSendingEvent property if you want to return the sheet for which this event occured.

Note: This event will occur if you use the fpSpread control in a scripting environment (for example, Microsoft's Visual InterDev or Internet Explorer) or a non-scripting environment. However, if you want to use the fpSpread control in a scripting environment and you want to change any parameter that is not passed "ByVal", you must set the ScriptEnhanced property to True and use the ScriptDataFill event. ScriptDataFill event parameters that are not passed "ByVal" are declared as variants.

See Also

DataFillEvent, ScriptEnhanced, SheetSendingEvent properties

GetDataFillData, SetDataFillData methods

Copyright © GrapeCity, inc. All rights reserved.