Data not populating in grid although I can see data is fetched from database.

QuestionsData not populating in grid although I can see data is fetched from database.
Param asked 9 years ago

I am using phpgird to display the data from MySQL. The data is retrieved and passed in correct JSON format but it is not displayed in the Grid.
An error message pops up with the fetched record.

Error Pop up has following fetched record:

{"page":"1","total":1,"records":"2","rows":[{"user_no":"1","login_nm":"test","user_first_nm":"test first nm","user_last_nm":"test last nm","user_disabled_in":"N","last_access_ts":"","add_ts":"","add_user_id":"","update_ts":"","update_user_id":"","chetna_usercol":""},{"user_no":"2","login_nm":"scan","user_first_nm":"scan first nm","user_last_nm":"scan last nm","user_disabled_in":"N","last_access_ts":"","add_ts":"","add_user_id":"","update_ts":"","update_user_id":"","chetna_usercol":""}]}

2 Answers
Abu Ghufran answered 9 years ago

This could be because of some white space / newline character at some place before render() function call.
Ideally, this should be no output html before $g->render() function.

Param answered 9 years ago

Thanks. I had an include before render() function which had HTML tag to include my main.css file.
After moving it below render(), it solved the issue and I am able to see the fetched records in Grid.

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 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?