| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version |
Arguments: grid-column
Returns the function that converts the programmatic value returned by this grid-column's data-reader function into the actual value that is displayed in a grid cell. This is similar to the on-print property of many controls. Typically the function returns a formatted string, but may return other sorts of values for grid-columns that represent data with non-strings (such as the bar-chart in the employee grid example). The employee grid example can be found on the Examples tab of the Navigator.
The function should take a single argument, which is an arbitrary data-object attribute value.
For example, in the employee grid example, the Department column's data-reader is employee-department, which is simply the reader method for the department slot of an employee instance. When called on an employee instance, this function returns a symbol like :marketing. This symbol is fine for representing the department programmatically, but to display it nicely in a grid cell, the Department grid-column has the data-read-converter "capitalize-if-symbol", which is a function that takes the symbol :marketing and returns the string "Marketing" to display in the grid cell.
A special case is that the values that appear in the drop-down list of
a combo-box-column-mixin
cell are
formatted by the on-print function of the grid-column
even
though the value appearing in the grid cell itself is formatted by the
column's data-read-converter function as
with other grid cells. To use the same formatting in both places,
specify the same function for each of these properties.
NOTE: Your application does not call the data-read-converter function; it supplies the data-read-converter function which is then called automatically by the system as needed.
package="common-graphics">data-read-converter is a property
of the grid-column
and row-header-column
classes.
Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version |