Set Heading Titles - GRID SENDMSG() Function 23
Syntax
TF$=SENDMSG(sysgui,id,23,0,title${,context{,ERR=lineref}})
Description
This function sets the titles of heading grids and allows the programmer to display data from the main grid in the associated heading grid. For example, a row header can be constructed from the main grid columns that display a customer's first and last names.
Set Cells - Grid SENDMSG() Function 21, Set Cell - Grid SENDMSG() Function 22, or Draw Cell - Grid SENDMSG() Function 54 can be used to put data in heading grids and are recommended for displaying constant data in heading grids.
Parameter |
Description |
sysgui |
SYSGUI channel. |
id |
Grid control ID. |
23 |
Number of this SENDMSG() function. |
0 |
Always zero. |
title$ |
A parsed string for which values are substituted based on the following formats: |
Visual PRO/5 manages heading grids by caching the values for the columns and the currently displayed set of rows. For Visual PRO/5 to obtain the initial data, the program must be able to return data for the column, row or specific cell when requested through a Notify message. If the grid receives data from an input channel, some aspects of this feature may not be available because Visual PRO/5 may not have seen the data at the time the grid needs to be displayed. When Set Cells - Grid SENDMSG() Function 21, Set Cell - Grid SENDMSG() Function 22, or Draw Cell - Grid SENDMSG() Function 54, are executed for a given column within the main grid, that cell is examined to determine if it is part of a formatted header used to update the information in the cached header cells. The header format string manages the entire header. Until all cells required to produce the formatted string are seen by one of the above SENDMSG() functions, the column or row header text will not be displayed.
When using Set Cells, Set Cell, or Draw Cell functions with a header grid, the format string managed by the header grid should be cleared so the values can be displayed correctly. The format string is not required for a heading grid but is supplied as a convenience. Although the column headings are always cached, row headings cannot be completely cached because the grid can contain over 2 billion rows. The row cache size is based upon the number of displayed rows. Therefore, if an application sets the column header cell values, Notify message requests for column heading cell information can be ignored (unless the cells are actually being changed). Because the row header cache may or may not properly set the row cells, the application should be set to always respond to Notify message requests for row heading cell information, unless a formatted string is used to manage the row heading. The return value is a one-byte string that indicates the success or failure of an operation; $01$ indicates success, $00$ indicates failure.