Structures_DataGrid::generateColumns() – Generate columns from a fields list


require_once 'Structures/DataGrid.php';

void Structures_DataGrid::generateColumns ( array $fields = array() )


This is a shortcut for adding simple columns easily, instead of creating them manually and calling addColumn() for each.

The generated columns are appended to the current column set.


array $fields

Fields and labels. Array of the form: array(field => label, ...) The default is an empty array, which means: all fields fetched from the datasource


throws no exceptions thrown


This function can not be called statically.

Fill a rendering container with data (Previous) Find a column by field name (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.