Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners

DB2 PHP Generator online Help

Prev Return to chapter overview Next

OnGetCustomColumnGroup

This event allows you to setup multi-row grid header. Live example.

 

Signature:

function OnGetCustomColumnGroup(FixedKeysArray $columns, 

                                ViewColumnGroup $columnGroup)

 

Parameters:

$columns

The associative array of column headers.

$columnGroup

The default (root) group. By default all column headers are placed in this group.

 

Description

You can organize columns in logical groups and display them using multi-row header representation. A column group is visually represented by a header displayed above the headers of the columns it combines. Each group can contain data columns as well as other groups.

 

Examples

All the examples below can be seen live in our Feature Demo.

 

Example 1

This example shows how to define an additional header for 3 columns:

 

$columnGroup->add(new ViewColumnGroup('Common info',

    array(

        $columns['id'],

        $columns['title'],

        $columns['release_date']

    )

));

 

Example 2

This example shows how to define nested column groups:

 

$columnGroup->add(new ViewColumnGroup('Addtional info',

    array(

        new ViewColumnGroup('Texts',

            array(

                $columns['genre_id'],

                $columns['original_title'],

                $columns['original_language_id']

            )

        ),

        new ViewColumnGroup('Numbers',

            array(

                $columns['runtime'],

                $columns['rating']

            )

        )

    )

));

 



Prev Return to chapter overview Next