Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by BVA on Jun 25, 2009 05:37
open dhtmlx forum
Grid: Cant load json

Hi,

I cant load the value of my data.json to the grid. The table will be displayed, but without data in it.

Here my data.json:
[{"id":"77","isLoaded":true,"isValid":false,"errorList":null},{"id":"5","isLoaded":true,"isValid":false,"errorList":null}]


The gridInit() :
indexgrid = new dhtmlXGridObject('index_grid_container');
...
indexgrid.init();
indexgrid.load("data.json","json");

what iam doing from?
Answer posted by dhxSupport on Jun 25, 2009 05:53
Your JSON should looks like that:
{
rows:[
 {"id":"77",
 "isLoaded":true,
 "isValid":false,
 "errorList":null,
 data:[]
 },{
 "id":"5",
 "isLoaded":true,
 "isValid":false,
 "errorList":null,
 data:[]
 }
 ]
}