Generic FunctionPackage: common-graphicsToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.1
Unrevised

data-read-converter

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 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.

data-read-converter is a property of the grid-column and row-header-column classes.


Copyright (c) 1998-2001, Franz Inc. Berkeley, CA., USA. All rights reserved.
Documentation for Allegro CL version 6.1 update # 1. This page was not revised.
Created 2001.12.15.

ToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.1
Unrevised