Hi All,
I am new to codeigniter framework, i was trying to integrate dhtmlx grid but seems like it doesn’t work at all.
Here is my code
[strong]Controller : grid.php[/strong]
<?php
require_once("./dhtmlx/connector/grid_connector.php");
require_once("./dhtmlx/connector/db_phpci.php");
DataProcessor::$action_param ="dhx_editor_status";
class Grid extends CI_Controller {
public function index()
{
$this->load->view('grid');
}
public function data()
{
//data feed
$this->load->database();
$connector = new GridConnector($this->db, "phpCI");
$connector->configure("news1","news1_id","id, title, slug,text");
$connector->render();
}
}
?>
[strong]View : grid.php[/strong]
<!DOCTYPE html>
<head>
<meta http-equiv="Content-type" c charset=utf-8">
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
<link rel="stylesheet" href="/dhtmlx/grid/dhtmlxgrid.css" type="text/css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="/dhtmlx/grid/skins/dhtmlxgrid_dhx_skyblue.css" type="text/css" media="screen" title="no title" charset="utf-8">
</head>
<body>
<div id="grid_here" height:400px;"> </div>
[removed]
mygrid = new dhtmlXGridObject('grid_here');
mygrid.setHeader("ID,TITLE,SLUG,TEXT");
mygrid.init();
mygrid.loadXML("./data"); //refers to the 'data' action that we will create in the next step
var dp = new dataProcessor("./data"); //refers to the 'data' action as well
dp.action_param = "dhx_editor_status";
dp.init(mygrid);
[removed]
</body>Problem is when i try to run this in my browser by doing either of below it doesn’t prompt for any error.
http://localhost/project4_ci_2.1.3/index.php/grid
I get the error 404 page not found.
If i run below : http://localhost/project4_ci_2.1.3/application/views/grid.php
Nothing is displayed
Can some one suggest me how to trouble shoot this ?
Regards/Uday