Hello,
I am at the point where I have the grid itself showing on the page but the data only appears in a separate error console.
I've read about session.save_path, but I don't know the ins and outs of it.
Windows Server 2008
PHP 5.6
I went through those steps, ajax is not showing any errors that I can see.
One thing I don't really understand is this statement:
"Also make sure you call ‘$g->render();’ function before any HTML is rendered "
Here is some of my code:
include("phpgrid/lib/inc/jqgrid_dist.php");
$g = new jqgrid($db_conf);
// set few params
$grid["caption"] = "MAPLE Management";
$g->set_options($grid);
$g->table = "Registrations";
// render grid and get html/js output
$out=$g->render("regList");
And then in the body of my HTML:
<div id="">
<table id="regList">
<?php echo $out?>
</table>
</div>
I can see the data in the error window as well as in Firebug. It's just not displaying in the grid.
The grid return JSON to load data which is returned by render() function.
So if you call this function after some html tags, it will send html along with json which will raise an error of invalid json.
The ideal code placements should be like this:
http://www.phpgrid.org/wp-content/uploads/code.png
If issue still exist, Please email me full php page for review (at [email protected])
Replied on email.
You must move all html including <doctype>….. after that php code that calls render function.
Why are set_col_hidden and set_dimension not working for me?
I get Fatal error: Call to undefined method jqgrid::set_dimension()
include("phpgrid/lib/inc/jqgrid_dist.php");
$g = new jqgrid($db_conf);
// set few params
$grid["caption"] = "MAPLE Management";
$g->set_options($grid);
$g->table = "Registrations";
//$g -> set_col_hidden('ID', false);
$g -> set_dimension(1000, 600);
// render grid and get html/js output
$out=$g->render("regList");