jqGrid with JSON data renders table as empty

后端 未结 9 2284
孤独总比滥情好
孤独总比滥情好 2020-12-30 06:39

I\'m trying to create a jqgrid, but the table is empty. The table renders, but the data doesn\'t show.

The data I\'m getting back from the php call is:



        
9条回答
  •  轮回少年
    2020-12-30 07:30

    In my case, the problem was caused by the following line of PHP code (which was taken from jqGrid demo):

    $responce->page = $page;
    

    What is wrong here is that: I am accessing property page of object $responce without creating it first. This caused Apache to display the following error message:

    Strict Standards: Creating default object from empty value in /home/mariusz/public_html/rezerwacja/apps/frontend/modules/service/actions/actions.class.php on line 35
    

    And finally the error message used to be send to json reader within the script.

    I fixed the problem by creating empty object:

    $responce = new stdClass();
    

提交回复
热议问题