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

Subscribe to our news:
Partners
Testimonials
Craig Cordell: "The simplicity of your code generator is fantastic. We've evaluated dozens of others over the past few years but have yet to find one that is as easy to use as yours".
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

Columns related methods

The grid has eight main presentations. Specific set of columns can be defined for each of presentation.

 

The following methods can be used to get a column of each of presentation.

 

Signature

Description

getViewColumn($columnName)

Returns the column in a table grid with the specified name.

getSingleRecordViewColumn($columnName)

Returns the column in a view form with the specified name.

getExportColumn($columnName)

Returns the column for an export with the specified name.

getPrintColumn($columnName)

Returns the column for a print with the specified name.

getCompareColumn($columnName)

Returns the column in a comparison page with the specified name.

getInsertColumn($columnName)

Returns the column in an insert form with the specified name.

getEditColumn($columnName)

Returns the column in an edit form with the specified name.

getMultiEditColumn($columnName)

Returns the column in a multi-edit form with the specified name.

 

The code in the examples below is used in the OnPreparePage event handler:

 

Example 1:

To hide the 'owner' column in a table grid, use the following code:

 

$column = $this->GetGrid()->getViewColumn('owner');

$column->setVisible(false);

 

 

Example 2:

To set a caption for the 'status' column of a view form, use the following code:

 

$column = $this->GetGrid()->getSingleRecordViewColumn('status');

$column->setCaption('New caption');

 

 

Example 3:

To set the 'approved' editor to read only in an edit form, use the following code:

 

$column = $this->GetGrid()->getEditColumn('approved');

$column->SetReadOnly(true);



Prev Return to chapter overview Next