Рекурсивный акроним словосочетания «PHP: Hypertext Preprocessor»
Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 16483 программиста и 1680 роботов. Сейчас ищут 1498 программистов ...
Structures_DataGrid::removeColumn
Вернуться к: Class Structures_DataGrid
Structures_DataGrid::removeColumn
Structures_DataGrid::removeColumn() – Remove a column
Synopsis
require_once 'Structures/DataGrid.php';
void Structures_DataGrid::removeColumn ( &$column , object $column )
This package is not documented yet.
Parameter
- &$column
- object $column
-
The Structures_DataGrid_Column object (reference to)
Throws
throws no exceptions thrown
Remove an unneeded column
<?php
$datagrid =& new Structures_DataGrid();
// Replace this with your database access informations:
$bindOptions['dsn'] = "mysql://foo:bar@host/world";
// The City table contains 5 fields: ID, Name, CountryCode, District and Population
$datagrid->bind("SELECT * FROM City ORDER BY Population", $bindOptions);
// We want to remove the ID field, so we retrieve a reference to the Column:
$column =& $datagrid->getColumnByField('ID');
// And we drop that column:
$datagrid->removeColumn($column);
// This will only render 4 fields: Name, CountryCode, District and Population:
$datagrid->render();
?>
Note
This function can not be called statically.
Вернуться к: Class Structures_DataGrid