OnFormatCell

<< Click to Display Table of Contents >>

 

OnFormatCell

OnFormatCell(Column, FieldName, OriginalValue, FormattedValue)

This event allows customizing the format of the text of E3Browser's cells. The parameters of this event are the following:

Column: Index of E3Browser's visible column, starting at 0 (zero). It allows identifying the cell's column being formatted

FieldName: A text with the name of the column's field being formatted

OriginalValue: Unformatted value of that cell, with a Variant type

FormattedValue: A formatted value, with a Variant type, according to the configuration of E3Browser's column. If it is modified inside this event, then it allows changing the formatted value

 

The next example shows the formatting of Alarm fields.

Sub E3Browser1_OnFormatCell(Column, FieldName, OriginalValue, FormattedValue)
  If Column = 15 Then
    If Not IsNull(OriginalValue) Then
      FormattedValue = SourceTypeName(OriginalValue)
  ElseIf Column = 9 Then
    If OriginalValue = 0 Then
      FormattedValue = "High"
    ElseIf OriginalValue = 1 Then
      FormattedValue = "Medium"
    Else
      FormattedValue = "Low"
    End If
  End If
End Sub

Was this page useful?