I want to integrate PhpGrid in my Cakephp Application.I am assuming that the integration will not have any problem.
Perhaps if someone has any experience please do share.
Integration should go smooth. It does not utilize cakephp data layer classes.
Just split the grid code in 2 parts. php in controller function and html in view. And pass $out to view.
From faq:
Q) How can i integrate PHPGrid in MVC based frameworks like Yii, Codeignitor, Zend Framework, CakePHP and others.
To integrate in MVC, You can divide code in 2 sections. And put first in controller and pass the $out variable to view, where you can render it with rest of JS/CSS files.
CONTROLLER PART
include("inc/jqgrid_dist.php");
$g = new jqgrid();
…
$out = $g->render("list1");
VIEW PART
<html>
<link rel="stylesheet" type="text/css" media="screen" href="js/themes/redmond/jquery-ui.custom.css"></link>
<link rel="stylesheet" type="text/css" media="screen" href="js/jqgrid/css/ui.jqgrid.css"></link>
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/jqgrid/js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="js/jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="js/themes/jquery-ui.custom.min.js" type="text/javascript"></script>
<div style="margin:10px">
<?php echo $out?>
</div>
If it is working means anyone please share the controller and ctp(view) code. because when i integrate phpgrid and cakephp 3.7 it will generate the errors in jqgrid_dist.php (undefined variable and many things) please share full code here.
You can try after disabling notices in cakephp:
https://stackoverflow.com/a/20697964/385377
Unfortunately, the core lib of data grid is written on older version of php and may show notices, but hiding them won’t do anything harmful.