I have tried various fixes suggested in the forum and elsewhere without luck
$grid->setSubGrid(“getLicenceDates.php”, array(‘Licence Start’,’Licence End’,’Credits’), array(200,200,200), array(‘left’,’left’,’left’)); in my main grid correctly calls the subgrid and passes the correct id to it, however while the headings are showing, not data is being displayed. The Select statement returns the correct record when used in phpMyAdmin. I use this same syntax in other subgrids and they all work.
SubGrid code
<?php
include_once ‘../includes/jq-config.php’;
// include the jqGrid Class
require_once “../javascript/Guriddo/php/PHPSuito/jqGrid.php”;
// include the PDO driver class
require_once “../javascript/Guriddo/php/PHPSuito/DBdrivers/jqGridPdo.php”;
// Connection to the server
$conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD);
// Get the needed parameters passed from the main grid
$rowid = jqGridUtils::Strip($_REQUEST[“id”]);
if(!$rowid) die(“Missed parameters”);
// Create the jqGrid instance
$grid = new jqGrid($conn);
// Write the SQL Query
$grid->SubgridCommand = “SELECT
organisation.LicenceStartDate as StartDate,
organisation.LicenceEndDate as Enddate,
organisation.CurrentCredits
FROM
organisation
WHERE
organisation.OrganisationID = “.$rowid;
// set the ouput format to json
$grid->dataType = ‘json’;
// Use the build in function for the simple subgrid
$grid->querySubGrid(array(&$rowid));
$conn = null;
?>
Any idea why this does not show the data please.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top