Leo Khaskin asked 2 weeks ago


trying to integrate phpgrid into cakephp application.

Grid fails on initialization

$g = new jqgrid($db_conf);


Any help greatly appreciated.



1 Answers
Abu Ghufran Staff answered 1 week ago

What i recommend is to place the lib/inc folder in “plugins/phpgrid/lib/inc”.

Then in controller, you can have: e.g.

namespace App\Controller;

use Cake\Core\Configure;
use Cake\Http\Exception\ForbiddenException;
use Cake\Http\Exception\NotFoundException;
use Cake\View\Exception\MissingTemplateException;
use Cake\Event\Event;

require_once(ROOT . DS . ‘plugins’ . DS . ‘phpgrid’ . DS . ‘lib’ . DS . ‘inc’ . DS . ‘jqgrid_dist.php’);
use jqgrid;

and later you can have controller method using this object.

public function grid()
// Database config file to be passed in phpgrid constructor
$db_conf = array(
“type” => “mysqli”,
“server” => “”,
“user” => “root”,
“password” => “”,
“database” => “test”

$g = new jqgrid($db_conf);


Abu Ghufran - Dev Team
PHP Grid Framework
Your Answer

7 + 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!