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

Subscribe to our news:
Partners
Testimonials
Grey: "We're a two-person company, it's just me an my wife. I'm the technical guru, and she handles the business operations. I have to know a lot about MySQL, but that's much too technical for her. I have frequently had to setup CGI scripts (I code in Perl) so she can manage some of our tables (suppliers, manufacturers, etc).

I discovered PHP Generator a couple of days ago, tried the free version,and within a few hours I had purchased the Pro version (as well as SQL Maestro for MySQL).

Today I am completing the conversion of the last of my custom table managers to PHP Generator. This is eliminating several thousand lines of code that I don't have to support any more!

Thanks for this fantastic product".

Ran Cole: "We bought the tool last week and want to say how much we love it. We've found it not only powerful, but very user friendly. We have used the tool to create an interface that manages our MySQL DB for different types of users".

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