Object Reference > True DBGrid Events > FormatText Event |
FormatText Event
The FormatText event occurs when the grid is about to display cell data in a column whose NumberFormat property is set to the string FormatText Event.
object_FormatText (ByVal ColIndex As Integer, Value As Variant, Bookmark As Variant)
Arguments
ColIndex is an integer that identifies the column being displayed.
Value is a variant containing the underlying data value.
Bookmark is a variant that uniquely identifies the row from which the underlying data value was obtained.
The Value argument contains the underlying data value and also serves as a placeholder for the formatted data to be displayed.
This event allows you to provide your own text formatting for cases where Visual Basic's intrinsic formatting is either unavailable or does not suit your needs.