Skip to content

psFooterText - cCJGridColumn

Specifies the text displayed in the column footer

Type: Property
Access: Read/Write
Data Type: String
Parameters: None

Syntax

Property String psFooterText
Access Type Syntax
Read Access: Get psFooterText to StringVariable
Write Access: Set psFooterText to StringVariable/Value

Description

To display a footer caption over multiple lines, specify the xtpAlignmentWordBreak flag in the column's peFooterAlignment property.

In order to display a footer section, the grid object's pbShowFooter property must be set True.

Sample

This sample shows how to sum the values in all rows of a grid column and display it as a properly formatted currency value in the column's footer. FormatCurrency is used to properly format the sum prior to displaying it.

Procedure SumUpColumn
    Number nSum
    String sFormattedSum
    Integer iRows iCol
    Handle hoDataSource
    tDataSourceRow[] gridData

    Move 3 to iCol  // which column gets totalled

    Get phoDataSource to hoDataSource
    Get DataSource of hoDataSource to gridData
    Move (SizeOfArray(gridData)) to iRows 
    For i from 0 to (iRows-1)
        Move (nSum + gridData[i].sValue[iCol]) to nSum
    Loop

    // format the sum
    Move (FormatCurrency(nSum,2)) to sFormattedSum

    // display the sum
    Set psFooterText of oTotalsColumn to sFormattedSum
End_Procedure

Default is "".