Structures_DataGrid::removeColumn

Structures_DataGrid::removeColumn() – カラムを削除する

Synopsis

require_once 'Structures/DataGrid.php';

void Structures_DataGrid::removeColumn ( &$column , object $column )

Description

This package is not documented yet.

Parameter

&$column

object $column

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

Throws

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

不要なカラムの削除

<?php
$datagrid 
=& new Structures_DataGrid();

// これは、あなたのデータベース環境に応じて書き換えます
$bindOptions['dsn'] = "mysql://foo:bar@host/world";

// City テーブルのフィールドは ID、Name、CountryCode、District および Population の 5 つです
$datagrid->bind("SELECT * FROM City ORDER BY Population"$bindOptions);

// ID フィールドを削除したいので、そのカラムへの参照を取得します
$column =& $datagrid->getColumnByField('ID');

// そしてそのカラムを削除します
$datagrid->removeColumn($column);

// これで Name、CountryCode、District および Population の 4 つだけをレンダリングします
$datagrid->render();
?>

Note

This function can not be called statically.

現在使用中の、あるいはデフォルトのレンダリングドライバを取得する (Previous) データグリッドをレンダリングする (Next)
Last updated: Sun, 19 May 2013 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.