Initial Set-up, non-specific error

QuestionsInitial Set-up, non-specific error
Mark asked 4 years ago

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

8 Answers
Abu Ghufran answered 4 years ago

Please refer http://www.phpgrid.org/faqs/#0
Let me know if issue persist

Mark answered 4 years ago

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>

Mark answered 4 years ago

I can see the data in the error window as well as in Firebug. It's just not displaying in the grid.

Abu Ghufran answered 4 years ago

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])

Mark answered 4 years ago

Email sent

Thank you

Abu Ghufran answered 4 years ago

Replied on email.
You must move all html including <doctype>….. after that php code that calls render function.

Mark answered 4 years ago

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");

Abu Ghufran answered 4 years ago

These functions are not supported.
Please refer http://phpgrid.org/docs

Your Answer

1 + 18 =

Login with your Social Id:

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:

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

Let us improve this post!