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

Subscribe to our news:
Partners
Testimonials
Lucian Nedescu: "Thank you very much. Have a nice century (this is a real wish :P). I think that i will do a great job on my clients database with the new php interface. Thank You again".
David Lantz: "Thank you, this is by far the simplest, and most friendly utility for building db record system I have ever used. I wish I could get my systems guys at the office to purchase this for our company would be so very helpful and speed up a lot of work. I for one have used it for everything from a simple inventory record of my house, to a members record for my church just little pet projects and a test bed to test my own db builds and theories before having to hand code at the office..... it is a lot of fun to work with".

More

Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next

OnCustomDrawRow

This event occurs on rendering a grid row. It is an extremely useful event for conditional formatting such as changing font color, font styles, row background color, cell background color, etc. This event (as well as the OnExtendedCustomDrawRow one) is used for conditional formatting. The only difference between these two events is that OnCustomDrawRow has a more understandable parameter list while OnExtendedCustomDrawRow provides more flexible abilities.

 

Signature:

function OnCustomDrawRow ($rowData, &$cellFontColor, &$cellFontSize, &$cellBgColor,

    &$cellItalicAttr, &$cellBoldAttr)

 

Parameters:

$rowData

The associative array of values that corresponds to the currently processed row.

$cellFontColor

The parameter allows to set a font color for selected fields.

$cellFontSize

The parameter defines a font size of selected data.

$cellBgColor

The parameter allows to set a background color of fields.

$cellItalicAttr

Set the parameter to true to represent text in cursive font.

$cellBoldAttr

Set the parameter to true to use bold font.

 

NB. $rowData array keys should contain the real column names in the data source (table, view, or query). Don't use column captions instead!

 

Example 1:

Suppose we need to create a webpage with list of customers with addresses represented in cursive. This column in the data source is named 'address_id' and the column's caption is "Address".

 

To define the font attribute, use the following code:

 

$cellItalicAttr['address_id'] = true;

 

Example 2:

In the example below we need to display winning team score in red and losing team score in black; moreover, both scores should be in bold and displayed by a 16pt font.

 

$cellFontSize['home_team_score'] = '16pt';

$cellBoldAttr['home_team_score'] = true;

 

$cellFontSize['away_team_score'] = '16pt';

$cellBoldAttr['away_team_score'] = true;

 

if ($rowData['home_team_score'] > $rowData['away_team_score'])

  $cellFontColor['home_team_score'] = '#F65317';

else

  $cellFontColor['away_team_score'] = '#000000';



Prev Return to chapter overview Next