PhpGrid With cakephp

QuestionsPhpGrid With cakephp
Usama asked 5 years ago

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.

3 Answers
Abu Ghufran answered 5 years ago

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.


$g = new jqgrid();

$out = $g->render("list1");



<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?>

Anand answered 3 months ago

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.

View post on

Abu Ghufran Staff answered 2 months ago

You can try after disabling notices in cakephp:

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.

Abu Ghufran - Dev Team
PHP Grid Framework
Your Answer

20 + 20 =

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!