hi.
dhtmlx is very new for me and may be I don’t see something obvious, but I can’t understand why my datastore parse doesn’t work as i expect. Here is full sample:
<html>
<head>
<link rel="STYLESHEET" type="text/css" href="dhtmlx.css">
<script src="dhtmlx.js"></script>
</head>
<body>
<script>
dhtmlx.image_path='imgs/';
var main_layout = new dhtmlXLayoutObject(document.body, '1C');
var cell_1 = main_layout.cells('a');
cell_1.hideHeader();
var mydata = new dhtmlXDataStore();
mydata.parse([{"id":"1", "value_date":"11/01/1982", "description":"some birthday", "comments":"good boy"},{"id":"2", "value_date":"11/01/1982", "description":"dummy date 01", "comments":""}], "json");
var grid_1 = cell_1.attachGrid();
grid_1.setIconsPath('imgs/');
grid_1.setHeader(["Base Date","Description","Comments"]);
grid_1.setColTypes("ed,ed,ed");
grid_1.setColumnIds('value_date,description,comments');
grid_1.init();
var mydata2 = new dhtmlXDataStore({
url:"grid_test_orig.json",
datatype:"json"
});
grid_1.sync(mydata);
//grid_1.sync(mydata2); // grid_test_orig.json is the same as in mydata.parse
</script>
</body>
<html>
I’m trying to use Grid this Datastore which use json object. If I’m using local json file (comment grid_1.sync(mydata) and uncomment grid_1.sync(mydata2)) grid is shown normally, but if i’m using datastore parse with SAME json - nothing is shown inside grid (and no errors in console)
Thanks for any advice.