Hi,
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();
$col1->field("OrderID")->headerText("OrderID")->textAlign("right")->width(100);
$col2 = new EJ\Grid\Column();
$col2->field("CustomerID")->headerText("CustomerID")->width(70);
$col3 = new EJ\Grid\Column();
$col3->field("EmployeeID")->headerText("EmployeeID")->textAlign("right")->width(70);
$col4 = new EJ\Grid\Column();
$col4->field("ShipCountry")->headerText("ShipCountry")->width(70);
$col5 = new EJ\Grid\Column();
$col5->field("Freight")->headerText("Freight")->textAlign("right")->format("{0:C}")->width(70);
$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();
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?
TIA
Mohan.