We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Unable to display data in a grid

Thread ID:





132759 Sep 19,2017 03:59 PM UTC Jun 13,2018 06:24 AM UTC PHP 4
Tags: Grid
Asked On September 19, 2017 03:59 PM UTC


I am trying the following:

<link rel="stylesheet" rel='nofollow' href="themes/bootstrap-theme/ej.web.all.min.css" /> 
<script src="scripts/external/jsrender.min.js"></script>
<script src="scripts/external/jquery-3.1.1.min.js"></script> 
<script src="scripts/web/ej.web.all.min.js"> </script> 
<?php require_once 'Src/AutoLoad.php'; ?>

<div class="cols-sample-area">
    $Json = json_decode(file_get_contents("data.json"), true);
    $col1 = new EJ\Grid\Column();
    $col2 = new EJ\Grid\Column();
    $col3 = new EJ\Grid\Column();
    $col4 = new EJ\Grid\Column();
    $col5 = new EJ\Grid\Column();
    $gridColumns = array($col1,$col2,$col3,$col4,$col5);
    $grid =  new EJ\Grid("Grid");
    $column=new EJ\Grid\Column();
    echo $grid -> dataSource($Json)->allowPaging(true)->columns($gridColumns)->render();

    .cols-sample-area {
        margin: 0 auto;
        float: none;

The data.json is from syncfusion samples.
The program does show that it is reading the data.json correctly bu displaying its contents in text form.
However, when it comes to displaying in the grid, it says "33 lines", but it is always empty and not displaying any data in the grid.

I have tried this with and without the line 
<script src="scripts/external/jsrender.min.js"></script>
in the header.

What is the right way to do this?


Replied On September 19, 2017 04:46 PM UTC

Replying my own question - may be this would help someone else..

The order in which js files are listed in the header makes a difference (On hindsight this is obvious!)

T changed the header like so:


<link rel="stylesheet" rel='nofollow' href="themes/bootstrap-theme/ej.web.all.min.css" /> 

<script src="scripts/external/jquery-3.1.1.min.js"></script> 

<script src="scripts/external/jsrender.min.js"></script>

<script src="scripts/web/ej.web.all.min.js"> </script> 


and it worked.


Mani Sankar Durai [Syncfusion]
Replied On September 20, 2017 11:23 AM UTC

Hi Mohan, 

We are happy to hear that your problem has been solved.  

Please let us know if you need further assistance. 

Manisankar Durai. 

Replied On June 12, 2018 10:06 AM UTC

Thanks Mohan for giving solution of the above problem. This problem could occur with any fresher or even experienced in PHP. 

Kuralarasan Muthusamy [Syncfusion]
Replied On June 13, 2018 06:24 AM UTC

Hi Customer, 

Thank you all. 

Kuralarasan M. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon