PEAR Manual
Prev |  | Next

# Structures_DataGrid_Column::Structures_DataGrid_Column()

Structures_DataGrid_Column::Structures_DataGrid_Column() -- Constructor

## Synopsis

    require_once 'Structures/DataGrid/Column.php';

``void Structures_DataGrid_Column` (string $columnName, string $fieldName [, string $orderBy = null [, array $attribs = array() [, string $autoFillValue = null [, string $formatter = null]]]])`

## Description

The constructor accepts 7 parameters that all help build and customize your datagrid column. A column object is "mapped" to a field in your dataset.

## Parameter

- `string $columnName` - The name of the column to be printed.

- `string $fieldName` - The name of the field for the column to be mapped to.

- `string $orderBy` - The field to determine which to order the column by.

- `array $attribs` - An associative array of attributes to be used for the column.

  > Note: Currently this is only used for the HTML Table renderer.

- `string $autoFillValue` - The value to be printed if the cell is empty

- `string $formatter` - The function to be called to allow for custom cell printing. See the section on "Using the Formatter".

Prev | Home | Next
Structures_DataGrid_Column | Up | Structures_DataGrid_Renderer_HTMLTable