develop faster.

PlatinumGrid has an extremely simple and flexible API. This allows developers to begin using PlatinumGrid very quickly, and allows them to access even advanced features with ease. This page demonstrates this easy-to-use API.

PlatinumGrid ships with over 30 examples covering virtually all features of the grid, that provide a simple and effective way of showing how to use the API. We've taken a few of these examples to convey some idea of the simplicity of using PlatinumGrid in any PHP application.

Note. For applications written using RadPHP, PlatinumGrid is a drag-and-drop component with complete integration into the RPCL. This page is intended for the developers who do not use RadPHP.

Custom SQL:
This example shows how to use custom queries to generate the data set for PlatinumGrid.
require_once( '' );

$dbConnection mysql_connect'localhost''root''' );

mysql_select_db'gridsamples'$dbConnection );

$dataSource = new MySQLDatasource$dbConnection );
$dataSource->DataSet->QueryCallback 'GenQuery';

GenQuery$dataSet )
$sql =
'SELECT e.FirstName, e.LastName, d.Department ' .
'FROM employeestiny e ' .
'INNER JOIN departments d ON d.ID = e.DepartmentID';


// Construct the grid.
$grid = new JTPlatinumGrid();
$grid->Datasource $dataSource;
$grid->Height '';
$grid->SiteTheme->Theme 'default';

  <title>Basic Custom SQL Demo</title>
  <h1>Basic Custom SQL Demo</h1>
  <form action="" method="post">
    <div id="<?php echo( $grid->Name ); ?>_outer">
<?php $grid->dumpContents(); ?>