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

Subscribe to our news:
Partners
Testimonials
Jonathan Oakes: "This is a lovely application. It's easy to hook into my own bespoke applications. It's very powerful, yet really quite simple to use. Thanks for this".
Philipp Gerber: "

The product is so easy and super built that you can achieve visible and great success after a short time. Also very much possible with the product. A class product. I'm already looking forward to the next versions and extensions. Keep it up.

Support to the product is just perfect. Each Support request is quickly and very competent solved. Also various assistance, which does not fall into a support, are also perfectly processed. There is a direct wire to the manufacturer / developer and this is notth. Thanks for the class Support".

More

Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next

OnCustomRenderTotals

This event occurs before total values rendering and allows you to replace the default total footer content. To use it, enable the grid footer in the View properties of the corresponding column.

 

 

Signature:

function OnCustomRenderTotals ($totalValue, $aggregate, $columnName,

    &$customText, &$handled)

 

Parameters:

$totalValue

The value of currently processed total.

$aggregate

The string representation of total aggregate ('AVG', 'SUM', 'MIN', 'MAX', 'COUNT').

$columnName

The column name of currently processed total.

$customText

A string to replace the total cell content.

$handled

A parameter to indicate whether the event handler executed. Set $handled to true in the event handler to apply new content.

 

Example 1:

The code below changes the caption of the 'amount' column footer and gives it strong importance.

 

if ($columnName == 'amount')

{

    $customText = '<strong>Total: $' . $totalValue . '</strong>';

    $handled = true;   

}

 

This picture demonstrates the difference between a webpage generated with default footer and a webpage with the OnCuStomRenderTotals event specified in this way:

 

 

Example 2:

The code below is used in our online demo on the 'Teams' page to display the year of foundation of the oldest team on the page in more convenient form.

 

if ($columnName == 'year_founded') {

   $customText = 'MIN: ' . intval(str_replace(',', '', $totalValue));

   $handled = true;

}

 



Prev Return to chapter overview Next