|
The php code that produced this grid is shown below. As you can see it is very simple. The whole thing is driven by the SQL statement in the first line. The only other compulsory line is the display() at the end that causes the grid to be built. The rest of the code is just prettying things up and adding additional features such as:
You can find more information and samples on the PHPGrid web site (phpgrid.com) |
$dg = new C_DataGrid("SELECT CustNo, NAme, City, State, Zip FROM PARTNER400.CUSTOMERSP", "CUSTNO", "CUSTOMERSP"); $dg->set_col_title('CUSTNO', 'Customer #'); $dg->set_col_title('NAME', 'Customer Name'); $dg->set_col_title('CITY', 'City'); $dg->set_col_title('STATE', 'State'); $dg->set_caption("Jon's Simple PHPGrid Demo"); $dg->enable_search(true); $dg->enable_edit('INLINE'); $dg->enable_export('PDF'); $dg -> display();