Noob: Headers ok but no Data

QuestionsNoob: Headers ok but no Data
Jan Rothe asked 7 years ago

Hi there,

im new to php grid and im unable to get it to work. THe grid gets als the fields from the table in his header, but doesnt show any data. Can you pls provide an helping hand ?

Needed js and css files are included in index.php. WIth Jquery 1.10 and 1.9 it doenst show any grid, with 1.8 it shows the grid but no data.

5 Answers
Jan Rothe answered 7 years ago

After installing Firefox and Firebug i guess i have an hint. JSON Output looks ok, shows 1 Page at a total of 3 with 51 records, thats ok …
But it throws an JSON Parse Error ….

varun answered 7 years ago

either you are not adding the $cols array or you are not displaying data in sql command

Jan Rothe answered 7 years ago

Is the $cols-Array required ? It doesn't look like this in the "getting started" docs … i dont add it … that should be the point then …. I'll give it a try ….

Jan Rothe answered 7 years ago

I'll gave it a shot, and no data anyway ….

this is what i added to my file:
$col = array();
$col["title"] = "ID";
$col["name"] = "id";
$col["width"] = "10";
$cols[] = $col;
$col = array();
$col["title"] = "User";
$col["name"] = "uid";
$col["width"] = "10";
$cols[] = $col;

And in chromedevtools this is the JSON-Response


but i dont get any data in the grid ….

Abu Ghufran answered 7 years ago


This error usually occur when you have some html code printed before $grid->render() function call, that causes invalid format of json data.

Please recheck OR post the code at [email protected]


Your Answer

12 + 0 =

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 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

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

Let us improve this post!

Tell us how we can improve this post?