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)
- IntegerColor()
- IntegeriValue
- Set(Integer iValue)
piDisabledColor:
specifies the column's disabled background color (clNone = use Grid's Color)
- IntegerpiDisabledColor()
- IntegeriValue
- Set(Integer iValue)
piDisabledTextColor:
specifies the column's disabled text color (clNone = use Grid's Color)
- IntegerpiDisabledTextColor()
- IntegeriValue
- Set(Boolean bValue)
pbAllowDrag
Allows\Disallows dragging of the column, see ReportColumn.AllowDrag
- BooleanpbAllowDrag()
- BooleanbValue
- Set(Boolean bValue)
pbAllowRemove
Allows\Disallows removing of the column, see ReportColumn.AllowRemove
- BooleanpbAllowRemove()
- BooleanbValue
- Set(Boolean bOn)
pbCapslock
Set True to force data entry in this column to uppercase characters.
- IntegeriValue
- IntegerhoEditOptions
- IntegerpbCapslock()
- BooleanbOn
- IntegeriValue
- IntegerhoEditOptions
- Set(Boolean bValue)
pbCheckbox
Specifies whether the column contains a CheckBox. See ReportRecordItem.HasCheckbox
- BooleanbAlignmentSet
- BooleanpbCheckbox()
- BooleanbValue
- Set(Boolean bValue)
pbComboButton
Specifies whether a combo control is used to edit this column.
- IntegerhoEditOptions
- BooleanpbComboButton()
- BooleanbValue
- Set(Boolean bValue)
pbComboEntryState
Similar to VDF Grid.Column_Combo_Entry_State. See ReportRecordItemEditOptions.ConstraintEdit
- IntegerhoEditOptions
- BooleanpbComboEntryState()
- BooleanbValue
- IntegerhoEditOptions
- Set(Boolean bValue)
pbDrawFooterDivider
Specifies whether a divider is drawn between column footers, see ReportColumn.DrawFooterDivider.
- BooleanpbDrawFooterDivider()
- BooleanbValue
- Set(Boolean bValue)
pbDrawHeaderDivider
Specifies whether the divider is drawn Between column headers. See ReportColumn.DrawHeaderDivider
- BooleanpbDrawHeaderDivider()
- BooleanbValue
- Set(Boolean bValue)
pbEditable:
Specifies whether the Items in the column can be edited. See ReportColumn.Editable and ReportRecordItemEditOptions.AllowEdit
- BooleanpbEditable()
- BooleanbValue
- Set(Boolean bValue)
pbMultiLine
Indicates whether the column supports multi-line rows. See ReportColumn.Alignment
- IntegereTextAlignment
- IntegereIconAlignment
- IntegereCurrentAlignment
- IntegereWordBreak
- BooleanpbMultiLine()
- BooleanbValue
- IntegereCurrentAlignment
- Set(Boolean bValue)
pbResizable:
Indicates whether the column is resizable. See ReportColumn.Resizable
- BooleanpbResizable()
- BooleanbValue
- Set(Boolean bValue)
pbShowInFieldChooser
Indicates If a column will appear in the FieldChooser when the column is hidden. See See ReportColumn.ShowInFieldChooser.
- BooleanpbShowInFieldChooser()
- BooleanbValue
- Set(Boolean bValue)
pbVisible
Specifies whether the column is visible in the ReportControl. See ReportColumn.Visible
- BooleanpbVisible()
- BooleanbValue
- Set(Integer eType)
peDataType
- BooleanbAlignmentSet
- IntegerpeDataType()
- IntegereType
- Set(XTPColumnAlignment eValue)
peIconAlignment:
Column alignment. See ReportColumn.Alignment
- IntegereTextAlignment
- IntegereIconAlignment
- IntegereCurrentAlignment
- IntegereWordBreak
- XTPColumnAlignmentpeIconAlignment()
- BigInteBigCurrent
- BigInteBigValue
- IntegereValue
- Set(XTPColumnAlignment eValue)
peFooterAlignment
Specifies the column footer text alignment. See ReportColumn.FooterAlignment
- XTPColumnAlignmentpeFooterAlignment()
- IntegereValue
- Set(XTPColumnAlignment eValue)
peHeaderAlignment
Specifies the column header text alignment. See ReportColumn.HeaderAlignment
- XTPColumnAlignmentpeHeaderAlignment()
- IntegereValue
- Set(XTPColumnAlignment eValue)
peTextAlignment:
Column alignment. See ReportColumn.Alignment
- IntegereTextAlignment
- IntegereIconAlignment
- IntegereCurrentAlignment
- IntegereWordBreak
- BigInteBigIconAlignment
- BigInteBigCurrentAlignment
- XTPColumnAlignmentpeTextAlignment()
- IntegereValue
- IntegereCurrentAlignment
- Set(Integer iValue)
piMaximumWidth
Maximum column width (If Set as positive). This only applies when AutoSize is False. See ReportColumn.MaximumWidth .
- IntegerpiMaximumWidth()
- IntegeriValue
- Set(Integer iValue)
piMaxLength
the maximum number of characters that can be entered when editing an item. See ReportControlItemEditOptions.MaxLength
- IntegerhoEditOptions
- IntegerpiMaxLength()
- IntegeriValue
- IntegerhoEditOptions
- Set(Integer iValue)
piMinimumWidth:
Specifies the minimum width that a column can be sized to If resizable. See ReportColumn.MinimumWidth
- IntegerpiMinimumWidth()
- IntegeriValue
- Set(Integer iValue)
piWidth:
Specifies the minimal default column width. See ReportColumn.Width
- IntegerpiWidth()
- IntegeriValue
- Set(String sValue)
psCaption
Text caption for the column header, see ReportColumn.psCaption
- StringpsCaption()
- StringsValue
- Set(String sValue)
psFooterText
The text that is displayed in the column's footer. see ReportColumn.FooterText
- StringpsFooterText()
- StringsValue
- Set(String sValue)
psImage:
Sets the image/icon name of an icon that is displayed in the column header. See ReportColumn.Icon.
- IntegeriIcon
- IntegerhoIcons
- StringpsImage()
- StringsValue
- Set(String sMask)
psMask
Edit mask string.
- StringpsMask()
- StringsMask
- Set(String sValue)
psTooltip
Tool tip that is displayed when the mouse cursor is positioned over the column header. See ReportColumn.Tooltip
- StringpsTooltip()
- StringsValue
- Set(Integer iValue)
TextColor:
specifies the column's background text color (clNone = use Grid's Color)
- IntegerTextColor()
- IntegeriValue
- 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
- IntegeriCount
- IntegerhoConstraints
- ComboDeleteData()
ComboDeleteData
Clears the combo list for this column. See ReportColumn.EditOptions.Constraints.DeleteAll
- IntegerhoConstraints
- 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
- IntegerComboFindItem(Integer iStartAt String sCaption)
Returns a match for the passed caption starting at position iStartAt
- IntegeriCount
- Integeri
- StringsValue
- tComboItemData[]ComboItemData
- ComboInitialize()
ComboInitialize:
Rebuilds the column combo list (ReportRecordItemConstraints) from the internal array of constraint data.
- tComboItemData[]AComboData
- IntegeriItem
- IntegericItem
- IntegerhoConstraints
- 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
- BooleanOnEntering()
OnEntering
- OnEntry()
OnEntry
- OnExit()
OnExit
- BooleanOnExiting()
OnExiting
- StringOnGetTooltip(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.
- BooleanOnValidating()
OnValidating
- BooleanEntering()
- BooleanbCancel
- BooleanExiting()
- BooleanbCancel
- Entry()
- Exit()
- BooleanValidating()
- BooleanbCancel
- StringSelectedRowValue()
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)
- StringsValue
- IntegerhoSelCol
- BooleanbEditMode
- StringRowValue(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)
- IntegerhoDataSource
- IntegeriId
- IntegeriSelRow
- StringsValue
- StringSelectedRowValueBeforeEdit()
This is the before value of this column for the selected row where before means
the value before the edit is commited.
- IntegerhoDataSource
- IntegeriId
- IntegeriRow
- StringsValue
- UpdateCurrentValue(String sValue)
update value in data-source
- IntegeriRow
- IntegerhoDataSource
- DatatypeEQtest(String sVal1 String sVal2 Boolean ByRef bError Boolean ByRef bIsEQ)
test if two values are valid and eq based on the passed datatype
- NumbernNum1
- NumbernNum2
- DatedDate1
- DatedDate2
- DateTimedtDateTime1
- DateTimedtDateTime2
- IntegerhOldErrorObj
- IntegereDataType
- BooleanNotifyEndEdit(String sValue)
sent when the grid exits edit mode and the value needs to be
updated. ret true if changed
- StringsOldValue
- BooleanbError
- BooleanbIsEQ
- UpdateFocusFieldValue()
commit the value in the edit control without losing its focus
- StringsValue
- BooleanbChange
- BooleanValueToCheckedState(String sValue)
returns boolean checked state of the passed value
- StringsValueTrue
- StringCheckedStateToValue(Boolean bChecked)
returns a string representing the passed checked state
- StringsValue
- BooleanNotifyItemChecked()
notification that a checked value has been pressed.
- BooleanbCancel
- BooleanbChecked
- StringsOldValue
- StringsValue
- BooleanIsColumnFocusable()
returns true of column can take the focus (focusable and editable)
- BooleanbVisible
- BooleanbFocusable
- BooleanbOk
- BooleanbCancel
- BooleanCanNavigateIntoColumn(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.
- BooleanbEditable
- BooleanbFocusable
- BooleanbOk
- BooleanbCancel
- BooleanNextColumn(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
- IntegeriIndex
- IntegeriCount
- BooleanbOk
- BooleanPreviousColumn(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
- IntegeriIndex
- IntegeriCount
- BooleanbOk
- IntegerColumnDisplayIndex()
This is the column displayed order of this object
- IntegeriIndex
- BooleanFormatDisplayValue(String ByRef sValue)
takes value from datasource and formats it for display.
- IntegerhoMasker
- IntegereDataType
- StringsMask
- StringFormatEditedValue(String sValue)
takes value from edit control and "unformats" it
- CreateColumn(Integer iColumn)
Creates the COM column object. Called as part of grid activation
- IntegerhoReportColumns
- IntegerhoEditOptions
- IntegerhoConstraints
- VariantvEditOptions
- VariantvConstraints
- Integer[]hoColumnObjects
- StringsCaption
- StringsValue
- IntegeriWidth
- IntegeriValue
- IntegeriRegisteredCol
- BooleanbResizable
- BooleanbValue
- VariantvComObject
- ReleaseObject()
Release/destroy the COM column object. Called as part of grid deactivation
- IntegerhoObject
- HandleCustomEditObject()
returns an initialized custom VDF edit object
- IntegerhoEdit
- IntegerhcClass
- BooleanbCombo
- BooleanbCheckBox
- BooleanbFocusable
- BooleanbEditable
- BooleanbUseVDF
- BooleanbCaps
- StringsMask
- IntegereValue
- IntegeriMax
- 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()
- IntegerhoPrompt
- Set(Integer iItem Handle hoPrompt)
- HandlePrompt_Object()
- IntegerhoPrompt
- Zoom()
- IntegerhoZoom
- Set(Integer iItem Handle hoZoom)
- HandleZoom_Object()
- IntegerhoZoom
- Prompt_Callback(Handle hoPrompt)
- StringInitialValue()
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
- BooleanbCheckbox
- StringsValue
- 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
- IntegeriColor
- IntegeriTextColor
- IntegeriDisabledColor
- IntegeriDisabledTextColor
- IntegeriSysColor
- IntegeriCol
- IntegeriSortCol
- IntegerhoPaint
- BooleanbFocusable
- BooleanbCheckbox
- BooleanbChecked
- BooleanbShade
- BooleanbANSI
- VariantvValue
- VariantAnsiValueToVariant(String sSource)
- VariantvValue
- AddresspvValue
- BooleanbOk
- AddresspWStr
- BooleanDEO_Object()
Can be used to determine if the column object understands the DEO interface
- tGridSortRulesColumnSortRules()
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
- tGridSortRulesSortRules
- HandleHeaderContextMenu(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
- HandleContextMenu(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)
- StringStatus_Help()
- StringsHelp
- UpdateDataSourceForSelectedRow(String sValue Boolean bPush)
- IntegerhoDataSource
- IntegeriThis
- OnSelectedRowDataChanged(String sOldValue String sValue)
- OnEditChanging()