configure flexigrid helper, and customize variable $colModel

admin

Administrator
Staff member
I try to start Flexigrid into Codeigniter.

I download demo files from here<br> <a href="http://gembelzillonmendonk.wordpres...igniter-with-advanced-searching-with-example/" rel="nofollow">http://gembelzillonmendonk.wordpres...igniter-with-advanced-searching-with-example/</a>

but i wrong to set up something:

Instruction from site:

<ul>
<li>extract .rar to CI folder**</li>
<li>open your controller (ie: CI_Folder\system\application\controllers\flexigrid.php)**</li>
<li>configure flexigrid helper, and customize variable $colModel, example:**

code example</li>
</ul>

What I did:<br>

<ul>
<li>I installed correctly CodeIgniter (<em>copy and paste inside htdocs - xampp</em>)<br></li>
<li>I created a database called 'country' and import sql file inside demo.<br></li>
<li>I copied correctly files an folders from demo files to my CI folder (<em>called grocery-crud-demo</em>).<br></li>
</ul>

But when I type on firefox <a href="http://localhost/grocery-crud-demo/index.php/flexigrid/index" rel="nofollow">http://localhost/grocery-crud-demo/index.php/flexigrid/index</a> I have this error

Code:
Fatal error: Class 'Controller' not found in C:\xampp\htdocs\grocery-crud-demo\application\controllers\flexigrid.php on line 2
A PHP Error was encountered

Severity: Error

Message: Class 'Controller' not found

Filename: controllers/flexigrid.php

Line Number: 2

Backtrace:

I read instruction also from here: <a href="http://roadmyapps.toile-libre.org/index.php/flexigrid/example" rel="nofollow">http://roadmyapps.toile-libre.org/index.php/flexigrid/example</a><br>but I don't understand which code exactly I must have into <strong>flexigrid.php</strong>

I don't understand how configure flexigrid helper, and customize variable $colModel.<br>

<h2>I need exact code into files. Have you idea?</h2>

<hr>

<strong>I find CodeIgniter 1.7.3 -- I repeat steps -- new error:</strong>

Code:
A PHP Error was encountered

Severity: Notice

Message: Undefined property: Ajax_model::$db

Filename: models/ajax_model.php

Line Number: 34

Fatal error: Call to a member function query() on a non-object in C:\xampp\htdocs\grocery-crud-demo\system\application\models\ajax_model.php on line 34

Code of ajax_model.php is this: <a href="http://pastebin.com/P3KawC7S" rel="nofollow">http://pastebin.com/P3KawC7S</a>