I am using Platinumgrid in my code and I want to hide last name column in the grid.
I also checked this url http://www.platinumgrid.com/hiddencolumns.php but cannot find any solution for my task.
Here is my code:
<?php
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->Header->SimpleFilter = false;
$grid->Height = '';
$grid->SiteTheme->Theme = 'default';
$textCol = new JTPlatinumGridTextColumn( $grid );
$textCol->Caption = 'First Name';
$textCol->DataField = 'FirstName';
$textCol->Name = 'FirstNameCol';
$textCol = new JTPlatinumGridTextColumn( $grid );
$textCol->Caption = 'Last Name';
$textCol->DataField = 'LastName';
$textCol->Name = 'LastNameCol';
$dateCol = new JTPlatinumGridDateTimeColumn( $grid );
$dateCol->Caption = 'Date';
$dateCol->DataField = 'DateCol';
$dateCol->Display = JTPlatinumGridDateTimeColumn::DateOnly;
$dateCol->Name = 'DateCol';
$grid->Columns = array( $textCol, $dateCol );
$grid->init();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Basic Columns Demo</title>
<?php
$grid->dumpHeaderCode();
?>
</head>
<body>
<h1>Basic Columns Demo</h1>
<form action="" method="post">
<div id="<?php echo( $grid->Name ); ?>_outer">
<?php $grid->dumpContents(); ?>
</div>
</form>
</body>
</html>
First time I am using Platinumgrid. Hoping for positive response. Thanks