Arguments: grid-column
Returns the function that retrieves the value to be represented in a grid cell. The data-reader function is a property of a grid-column, and is called once for each grid-row that intersects that column to find the value to be displayed in the cell at that intersection. The function should take a single argument, which is the grid-row's data-object. The function is typically simply the reader function of the data-object for the attribute represented by this grid-column.
For example, in the employee grid example, each row represents an employee, and the Department column represents the department attribute of each employee. The data-reader function of the Department column is employee-department, which is simply the reader method for the department slot of an employee instance. To find the value to represent in the Department column for each employee, the Department column's data-reader function (employee-department) is called on the data-object (an employee) of each grid-row.
NOTE: Your application typically will not call the data-reader
function, and instead will supply the data-reader function which is
then called automatically by the system as needed. Specifically, the
built-in column classes such as editable-text-column-mixin
will
call the data-reader whenever they draw a cell, and a custom draw-cell method that an
application supplies may call the default read-cell-value method, which calls
the data-reader. Otherwise the draw-cell method may use some
custom technique to find the value to draw, and a data-reader method
is not needed at all.
data-reader is a property of the grid-column
and row-header-column
classes.
Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.
The documentation is described in introduction.htm and the index is in index.htm.
Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.
Created 2000.10.5.