Skip to content

Datagrid is not visible except the header and footer

It’s a common issue that datagrid seems to render, but only the header and footer are displayed. There is no data displayed in the grid.

  1. The first thing to look at is to check if the PHP session is enabled. Run phpinfo() and see if the session.save_path was set to a valid path. In most cases, this is the issue.

  2. Following above, also make sure session.auto_start must be set to "1"

  3. If the first step doesn't resolve the issue, check if SERVER_ROOT has been set correctly. See installation article for details for how to set server root in conf.php.

  4. If the first two all look fine. Here's what you can do next. In Firefox browser use Firebug (Press F12) to view the ajax response returned from "data.php". Likely there's an error occurred on the server during Ajax call. 

  5. As pointed out by a few users, some HTML editors adds a new line before the beginning <?php tag in the config.php file. Apache web server has issues with it. Try to use a different HTML editor like Notepadd++ to avoid this kind of issue. When using Notepad++, make sure the encoding is set to UTF-8 without BOM.

  6. phpGrid uses the default PHP session name. If you get a similar error message such as the following: Notice: Undefined index: _oPHPGRID_tablename_sql in /home/www/phpGrid/data.php(1) : eval()'d code on line 1, you will need to declare your custom session name in conf.php

  7. Including multiple jQuery can cause issue. phpGrid includes its own version of jQuery 3. Some framework includes jQuery that could create conflicts. 

  8. Check the parameters in the constructor are all set correctly. It needs ALL three parameters to work:
    1. the sql statement,
    2. primary key,
    3. and table name 
  9. Update (Windows users):

    Microsoft IIS web server sometimes displays a generic 500 internal error message. You must change the IIS settings to display server error in details with the following steps:

    Error Pages -> 500 -> Edit Feature Settings -> "Detailed Errors"

    If you are using IE, be sure to also uncheck "Show friendly HTTP error messages" in Internet Options:

Feedback and Knowledge Base