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

Subscribe to our news:
Partners
Testimonials
John Gondek: "Your software is amazing. I consider myself a novice at PHP and JS and with your software I have a web page that is truly fantastic. Thank you so much ".
Simon Greener: "A lot of work went in to designing our application database. PHP Generator allowed us to build a fully functional, professional looking, and functionally powerful web application from that database. It has freed us from worrying about low level code, enabling us to focus on the business requirements of the customer. The support provided is excellent with staff quickly producing answers to questions ranging from newbie to simple or complex. I highly recommend the product".

More

Add your opinion

PostgreSQL PHP Generator 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