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.
The first example is just a basic grid, showing the records in a dataset.
require_once( 'grid.inc.php' );
$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->Height = '';
$grid->SiteTheme->Theme = 'sky';
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<title>Basic MySQL Demo</title>
<h1>Basic MySQL Demo</h1>
<form action="" method="post">
<div id="<?php echo( $grid->Name ); ?>_outer">
<?php $grid->dumpContents(); ?>
Copyright © JomiTech 2010. All Rights Reserved. |