cGridColumn
-------------
Wraps the interface for each grid column.
Construct_Object()
Set(Integer iValue)
========================================================================================
Property Get/Set Methods................................................................
========================================================================================
Color:
specifies the column's background color (clNone = use Grid's Color)
- Integer
Color()
- Integer
iValue
Set(Integer iValue)
piDisabledColor:
specifies the column's disabled background color (clNone = use Grid's Color)
- Integer
piDisabledColor()
- Integer
iValue
Set(Integer iValue)
piDisabledTextColor:
specifies the column's disabled text color (clNone = use Grid's Color)
- Integer
piDisabledTextColor()
- Integer
iValue
Set(Boolean bValue)
pbAllowDrag
Allows\Disallows dragging of the column, see ReportColumn.AllowDrag
- Boolean
pbAllowDrag()
- Boolean
bValue
Set(Boolean bValue)
pbAllowRemove
Allows\Disallows removing of the column, see ReportColumn.AllowRemove
- Boolean
pbAllowRemove()
- Boolean
bValue
Set(Boolean bOn)
pbCapslock
Set True to force data entry in this column to uppercase characters.
- Integer
iValue - Integer
hoEditOptions
- Integer
pbCapslock()
- Boolean
bOn - Integer
iValue - Integer
hoEditOptions
Set(Boolean bValue)
pbCheckbox
Specifies whether the column contains a CheckBox. See ReportRecordItem.HasCheckbox
- Boolean
bAlignmentSet
- Boolean
pbCheckbox()
- Boolean
bValue
Set(Boolean bValue)
pbComboButton
Specifies whether a combo control is used to edit this column.
- Integer
hoEditOptions
- Boolean
pbComboButton()
- Boolean
bValue
Set(Boolean bValue)
pbComboEntryState
Similar to VDF Grid.Column_Combo_Entry_State. See ReportRecordItemEditOptions.ConstraintEdit
- Integer
hoEditOptions
- Boolean
pbComboEntryState()
- Boolean
bValue - Integer
hoEditOptions
Set(Boolean bValue)
pbDrawFooterDivider
Specifies whether a divider is drawn between column footers, see ReportColumn.DrawFooterDivider.
- Boolean
pbDrawFooterDivider()
- Boolean
bValue
Set(Boolean bValue)
pbDrawHeaderDivider
Specifies whether the divider is drawn Between column headers. See ReportColumn.DrawHeaderDivider
- Boolean
pbDrawHeaderDivider()
- Boolean
bValue
Set(Boolean bValue)
pbEditable:
Specifies whether the Items in the column can be edited. See ReportColumn.Editable and ReportRecordItemEditOptions.AllowEdit
- Boolean
pbEditable()
- Boolean
bValue
Set(Boolean bValue)
pbMultiLine
Indicates whether the column supports multi-line rows. See ReportColumn.Alignment
- Integer
eTextAlignment - Integer
eIconAlignment - Integer
eCurrentAlignment - Integer
eWordBreak
- Boolean
pbMultiLine()
- Boolean
bValue - Integer
eCurrentAlignment
Set(Boolean bValue)
pbResizable:
Indicates whether the column is resizable. See ReportColumn.Resizable
- Boolean
pbResizable()
- Boolean
bValue
Set(Boolean bValue)
pbShowInFieldChooser
Indicates If a column will appear in the FieldChooser when the column is hidden. See See ReportColumn.ShowInFieldChooser.
- Boolean
pbShowInFieldChooser()
- Boolean
bValue
Set(Boolean bValue)
pbVisible
Specifies whether the column is visible in the ReportControl. See ReportColumn.Visible
- Boolean
pbVisible()
- Boolean
bValue
Set(Integer eType)
peDataType
- Boolean
bAlignmentSet
- Integer
peDataType()
- Integer
eType
Set(XTPColumnAlignment eValue)
peIconAlignment:
Column alignment. See ReportColumn.Alignment
- Integer
eTextAlignment - Integer
eIconAlignment - Integer
eCurrentAlignment - Integer
eWordBreak
- XTPColumnAlignment
peIconAlignment()
- BigInt
eBigCurrent - BigInt
eBigValue - Integer
eValue
Set(XTPColumnAlignment eValue)
peFooterAlignment
Specifies the column footer text alignment. See ReportColumn.FooterAlignment
- XTPColumnAlignment
peFooterAlignment()
- Integer
eValue
Set(XTPColumnAlignment eValue)
peHeaderAlignment
Specifies the column header text alignment. See ReportColumn.HeaderAlignment
- XTPColumnAlignment
peHeaderAlignment()
- Integer
eValue
Set(XTPColumnAlignment eValue)
peTextAlignment:
Column alignment. See ReportColumn.Alignment
- Integer
eTextAlignment - Integer
eIconAlignment - Integer
eCurrentAlignment - Integer
eWordBreak - BigInt
eBigIconAlignment - BigInt
eBigCurrentAlignment
- XTPColumnAlignment
peTextAlignment()
- Integer
eValue - Integer
eCurrentAlignment
Set(Integer iValue)
piMaximumWidth
Maximum column width (If Set as positive). This only applies when AutoSize is False. See ReportColumn.MaximumWidth .
- Integer
piMaximumWidth()
- Integer
iValue
Set(Integer iValue)
piMaxLength
the maximum number of characters that can be entered when editing an item. See ReportControlItemEditOptions.MaxLength
- Integer
hoEditOptions
- Integer
piMaxLength()
- Integer
iValue - Integer
hoEditOptions
Set(Integer iValue)
piMinimumWidth:
Specifies the minimum width that a column can be sized to If resizable. See ReportColumn.MinimumWidth
- Integer
piMinimumWidth()
- Integer
iValue
Set(Integer iValue)
piWidth:
Specifies the minimal default column width. See ReportColumn.Width
- Integer
piWidth()
- Integer
iValue
Set(String sValue)
psCaption
Text caption for the column header, see ReportColumn.psCaption
- String
psCaption()
- String
sValue
Set(String sValue)
psFooterText
The text that is displayed in the column's footer. see ReportColumn.FooterText
- String
psFooterText()
- String
sValue
Set(String sValue)
psImage:
Sets the image/icon name of an icon that is displayed in the column header. See ReportColumn.Icon.
- Integer
iIcon - Integer
hoIcons
- String
psImage()
- String
sValue
Set(String sMask)
psMask
Edit mask string.
- String
psMask()
- String
sMask
Set(String sValue)
psTooltip
Tool tip that is displayed when the mouse cursor is positioned over the column header. See ReportColumn.Tooltip
- String
psTooltip()
- String
sValue
Set(Integer iValue)
TextColor:
specifies the column's background text color (clNone = use Grid's Color)
- Integer
TextColor()
- Integer
iValue
ComboAddItem(String sCaption Integer iData)
========================================================================================
Methods.................................................................................
========================================================================================
ComboAddItem
Adds a member to the combo list for this column. See ReportColumn.EditOptions.Constraints.Add
sCaption - Is the value displayed in the combo list.
iData - Is the numeric data value representing the combo item.
- tComboItemData[]
AComboData - Integer
iCount - Integer
hoConstraints
ComboDeleteData()
ComboDeleteData
Clears the combo list for this column. See ReportColumn.EditOptions.Constraints.DeleteAll
- Integer
hoConstraints
- tComboItemData[]
ComboData()
ComboData
Returns the set of combo items in the combo list for this column. See ReportColumn.EditOptions.Constraints.Constraint.Data
I decided to return the entire set of combo items in an array of struct. We could change this to provide an indexed access.
- tComboItemData[]
AComboData
- Integer
ComboFindItem(Integer iStartAt String sCaption)
Returns a match for the passed caption starting at position iStartAt
- Integer
iCount - Integer
i - String
sValue - tComboItemData[]
ComboItemData
ComboInitialize()
ComboInitialize:
Rebuilds the column combo list (ReportRecordItemConstraints) from the internal array of constraint data.
- tComboItemData[]
AComboData - Integer
iItem - Integer
icItem - Integer
hoConstraints
Error_Report(Integer iErrNum Integer iErrLine String sErrMsg)
Use this object to trap the error and do nothing
OnCreateColumn()
OnCreateColumn
event called at end of creation of com column object
OnEndEdit(String sOldValue String sNewValue)
OnEndEdit
- Boolean
OnEntering()
OnEntering
OnEntry()
OnEntry
OnExit()
OnExit
- Boolean
OnExiting()
OnExiting
- String
OnGetTooltip(Integer iRow String sValue String sText)
OnGetTooltip
Fired whenever the mouse is positioned over a grid cell belonging to this column.
iRow - Is the row number of the cell that the mouse is positioned over.
sValue - Is the current cell value of the cell that the mouse is positioned over.
sText - Is the default tooltip to be displayed
returns - The tooltip to display for the current mouse co-ordinate.
Return empty string to cancel tooltip display over this cell.
OnSetDisplayMetrics(Handle hoGridItemMetrics Integer iRow String ByRef sValue)
OnSetDisplayMetrics
Fired when each cell in the column is about to get painted. Use this method to customize the cell's display attributes (color etc).
hoGridItemMetrics - This is a handle to a cCJReportRecordItemMetrics object. Manipulate the properties of this objecty to modify
the display attributes of the cell being painted.
iRow - Is the row number of the row whose cell is being painted.
sValue - Is the cell text that is to be painted.
- Boolean
OnValidating()
OnValidating
- Boolean
Entering()
- Boolean
bCancel
- Boolean
Exiting()
- Boolean
bCancel
Entry()
Exit()
- Boolean
Validating()
- Boolean
bCancel
- String
SelectedRowValue()
Return the value for this column for the selected row. If this happens to be
a column being edited it has the edited value (i.e., the value in the edit object)
- String
sValue - Integer
hoSelCol - Boolean
bEditMode
- String
RowValue(Integer iRow)
Return the value for this column for the passed row. If this happens to be
a column being edited it has the edited value (i.e., the value in the edit object)
- Integer
hoDataSource - Integer
iId - Integer
iSelRow - String
sValue
- String
SelectedRowValueBeforeEdit()
This is the before value of this column for the selected row where before means
the value before the edit is commited.
- Integer
hoDataSource - Integer
iId - Integer
iRow - String
sValue
UpdateCurrentValue(String sValue)
update value in data-source
- Integer
iRow - Integer
hoDataSource
DatatypeEQtest(String sVal1 String sVal2 Boolean ByRef bError Boolean ByRef bIsEQ)
test if two values are valid and eq based on the passed datatype
- Number
nNum1 - Number
nNum2 - Date
dDate1 - Date
dDate2 - DateTime
dtDateTime1 - DateTime
dtDateTime2 - Integer
hOldErrorObj - Integer
eDataType
- Boolean
NotifyEndEdit(String sValue)
sent when the grid exits edit mode and the value needs to be
updated. ret true if changed
- String
sOldValue - Boolean
bError - Boolean
bIsEQ
UpdateFocusFieldValue()
commit the value in the edit control without losing its focus
- String
sValue - Boolean
bChange
- Boolean
ValueToCheckedState(String sValue)
returns boolean checked state of the passed value
- String
sValueTrue
- String
CheckedStateToValue(Boolean bChecked)
returns a string representing the passed checked state
- String
sValue
- Boolean
NotifyItemChecked()
notification that a checked value has been pressed.
- Boolean
bCancel - Boolean
bChecked - String
sOldValue - String
sValue
- Boolean
IsColumnFocusable()
returns true of column can take the focus (focusable and editable)
- Boolean
bVisible - Boolean
bFocusable - Boolean
bOk - Boolean
bCancel
- Boolean
CanNavigateIntoColumn(Boolean bForward)
returns true if keyboard navigation is allowed for this column.
pass whether the navigation is forward or backwards, return True if allowed
We don't test Entering here, which can refuse the focus. Even though you can navigate
into the column, Entering or Exiting might not allow it when the change is attempted.
- Boolean
bEditable - Boolean
bFocusable - Boolean
bOk - Boolean
bCancel
- Boolean
NextColumn(Handle ByRef hoCol Boolean ByRef bWrap)
Find the next column that can be navigated into. Returns byref the new column and if this is
a wrap. If return value is True if column could be found
- Integer[]
hoCols - Integer
iIndex - Integer
iCount - Boolean
bOk
- Boolean
PreviousColumn(Handle ByRef hoCol Boolean ByRef bWrap)
Find the previous column that can be navigated into. Returns byref the new column and if this is
a wrap. If return value is True if success
- Integer[]
hoCols - Integer
iIndex - Integer
iCount - Boolean
bOk
- Integer
ColumnDisplayIndex()
This is the column displayed order of this object
- Integer
iIndex
- Boolean
FormatDisplayValue(String ByRef sValue)
takes value from datasource and formats it for display.
- Integer
hoMasker - Integer
eDataType - String
sMask
- String
FormatEditedValue(String sValue)
takes value from edit control and "unformats" it
CreateColumn(Integer iColumn)
Creates the COM column object. Called as part of grid activation
- Integer
hoReportColumns - Integer
hoEditOptions - Integer
hoConstraints - Variant
vEditOptions - Variant
vConstraints - Integer[]
hoColumnObjects - String
sCaption - String
sValue - Integer
iWidth - Integer
iValue - Integer
iRegisteredCol - Boolean
bResizable - Boolean
bValue - Variant
vComObject
ReleaseObject()
Release/destroy the COM column object. Called as part of grid deactivation
- Integer
hoObject
- Handle
CustomEditObject()
returns an initialized custom VDF edit object
- Integer
hoEdit - Integer
hcClass - Boolean
bCombo - Boolean
bCheckBox - Boolean
bFocusable - Boolean
bEditable - Boolean
bUseVDF - Boolean
bCaps - String
sMask - Integer
eValue - Integer
iMax
CreateCurrencyMask(Integer iLeft Integer iRight)
Can be used to set up a currency/mask for this column by passing
digits to the left and right
CreateNumericMask(Integer iLeft Integer iRight)
Can be used to set up a numric/mask for this column by passing
digits to the left and right
Prompt()
- Integer
hoPrompt
Set(Integer iItem Handle hoPrompt)
- Handle
Prompt_Object()
- Integer
hoPrompt
Zoom()
- Integer
hoZoom
Set(Integer iItem Handle hoZoom)
- Handle
Zoom_Object()
- Integer
hoZoom
Prompt_Callback(Handle hoPrompt)
- String
InitialValue()
Called when an initial value is needed. With simple grids this is called
when a row is inserted or appended. With dbgrids it is called for each record found
- Boolean
bCheckbox - String
sValue
UpdateDataToExternalSource(String sValue Integer iUpdateFlag Integer iFlags)
DrawCell(Handle hoRow Handle hoItem Handle hoMetrics Integer iRow String sValue)
called in OnComBeforeDrawRow to paint for this column
- Integer
iColor - Integer
iTextColor - Integer
iDisabledColor - Integer
iDisabledTextColor - Integer
iSysColor - Integer
iCol - Integer
iSortCol - Integer
hoPaint - Boolean
bFocusable - Boolean
bCheckbox - Boolean
bChecked - Boolean
bShade - Boolean
bANSI - Variant
vValue
- Variant
AnsiValueToVariant(String sSource)
- Variant
vValue - Address
pvValue - Boolean
bOk - Address
pWStr
- Boolean
DEO_Object()
Can be used to determine if the column object understands the DEO interface
- tGridSortRules
ColumnSortRules()
returns a tGridSortRules type which defines the rules for sorting this column.
by default the rule is sort ascending the current column based on its datatype
- tGridSortRules
SortRules
- Handle
HeaderContextMenu(Handle hoMenu)
allows you to assign a different header context menu for this column. The
current default grid menu is passed in. If you return 0, no menu is used
- Handle
ContextMenu(Handle hoMenu)
allows you to assign a different row context menu for this column. The
current default grid menu is passed in. If you return 0, no menu is used
Set(String sHelp)
- String
Status_Help()
- String
sHelp
UpdateDataSourceForSelectedRow(String sValue Boolean bPush)
- Integer
hoDataSource - Integer
iThis
OnSelectedRowDataChanged(String sOldValue String sValue)
OnEditChanging()