Spread 8.0 Documentation
DataColConfig Event
Support Options
ActiveX Reference > ActiveX Events > DataColConfig Event

Glossary Item Box

DataColConfig Event


See Also

Applies To

fpSpread control

Description

Occurs for each column in the sheet as the sheet is bound to a database.

Syntax

C++

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

Visual Basic

Sub fpSpread_DataColConfig(ByVal Col As Long, ByVal DataField As String, ByVal DataType As Integer)

Parameters

The following parameters are available:

Parameter Description
Col Column number of column being configured
DataField Database field name
DataType Data type as defined by the database
(See the table of data types in the "Remarks" section.)

Remarks

This event occurs for bound fpSpread controls. After the control is bound to a database, if the DAutoCellTypes property is set to True, the fpSpread control sets the cell type for each cell based on the type of data in the database field bound to the cell. If the DAutoSizeCols property is set to a value other than 0 (Off), this event occurs before the columns automatically size for the data.

You can evaluate the cell types set by the fpSpread control for the bound data and change them as needed within this event procedure. Use the CellType property to determine the assigned cell type; then change the cell types as appropriate.

The following data types are assigned when the DAutoCellTypes property is set to True:

Data Type Spread Cell Type Notes
1 - Boolean Check Box Displays selected check box when value is 0; displays cleared check box when value is 1
2 - Byte Number Minimum value: 0
Maximum value: 255
3 - Integer Number Minimum value: –32,768
Maximum value: 32,767
4 - Long Number Minimum value: –2,147,483,648
Maximum value: 2,147,483,647
5 - Currency Currency Minimum value: –999,999,999,999.99
Maximum value: 999,999,999,999.99
6 - Single Number Minimum value: –999,999,999,999.99
Maximum value: 999,999,999,999.99
7 - Double Number Minimum value: –999,999,999,999.99
Maximum value: 999,999,999,999.99
8 - Date/Time Date Displays only the date
(You can change the cell type to Time, if you prefer.)
10 - Text Edit ASCII text with a maximum length of 64K
(The string should not include embedded tabs.)

Note The default maximum length is 255 characters. Set the TypeMaxEditLen property in this event to change this value.

11 - Binary Picture Displays only bitmaps
12 - Memo Edit Displays multiple-line edit cell

Note The default is maximum length is 32,000 characters. Set the TypeMaxEditLen property in this event to change this value.

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

See Also

Sizing Columns in Bound Sheets
Assigning Cell Types for Bound Sheets

CellType, DAutoCellTypes, DAutoSizeCols, SheetSendingEvent, TypeMaxEditLen properties

Copyright © GrapeCity, inc. All rights reserved.