Structures_DataGrid::addColumn

Structures_DataGrid::addColumn() – カラムを追加する。オプションでその位置を指定する

Synopsis

require_once 'Structures/DataGrid.php';

mixed Structures_DataGrid::addColumn ( &$column , string $position = 'last' , string $relativeTo = = null , object $column )

Description

This package is not documented yet.

Parameter

&$column

string $position

"last"、"first"、"after" あるいは "before" のいずれか (デフォルト: "last")。

string $relativeTo

基準となるカラムの名前 (ラベル) あるいはフィールド名。 $position が "after" あるいは "before" の場合に使用します。

object $column

Structures_DataGrid_Column オブジェクトへの参照。

Return value

失敗した場合に PEAR_Error を返します。それ以外の場合は値を返しません。

Throws

例外はスローされません。

シンプルなカラムの追加

<?php
$datagrid 
=& new Structures_DataGrid();
$column = new Structures_DataGrid_Column('Title''title''title', array('align' => 'center'), 'N/A'null);
$datagrid->addColumn($column);
?>

Note

This function can not be called statically.