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.

Defining Columns:
To define columns, just create instances of the various column classes, and assign them to the Columns property of the grid.
require_once( '' );

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

mysql_select_db'gridsamples'$dbConnection );

$dataSource = new MySQLDatasource$dbConnection );
$dataSource->DataSet->TableName 'employeestiny';

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

$textCol = new JTPlatinumGridTextColumn$grid );
$textCol->Caption 'First Name';
$textCol->DataField 'FirstName';
$textCol->Name 'FirstNameCol';

$dateCol = new JTPlatinumGridDateTimeColumn$grid );
$dateCol->Caption 'Date';
$dateCol->DataField 'DateCol';
$dateCol->Display JTPlatinumGridDateTimeColumn::DateOnly;
$dateCol->Name 'DateCol';

$grid->Columns = array( $textCol$dateCol );

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