"TypeError: d is undefined" error when creating a tree grid

I am trying to create a tree grid with the data store.
When I create it w/o the datastore, the grid works, but when I try loading the grid using the datastore it gives the error

TypeError: d is undefined dhtmlxtreegrid.js line 29

Please find the code snippet below :

[i]

[/i]

Also find the json in the data.json below :

[{
id: ‘1001’,
tree: “row A”,
title: “A Time to Kill”,
name: “John Grisham”,
price: “12.99”,
status: “1”,
date: “05/01/1998”,
rows: [{
id: ‘sub_1001’,
tree: “subrowA”,
title: “Blood and Smoke”,
name: “Stephen King”,
price: “0”,
status: “1”,
date: “01/01/2000”
}, {
id: ‘sub_1002’,
tree: “subrowB”,
title: “Blood and Smoke”,
name: “Stephen King”,
price: “0”,
status: “1”,
date: “01/01/2000”
}]
}, {
id: ‘1002’,
tree: “row B”,
title: “The Green Mile”,
name: “Stephen King”,
price: “11.10”,
status: “1”,
date: “01/01/1992”
}]

You are using treegrid, but datastore is purposed to store plain data. Only plain grid can be synced with datastore.

What else can I do?
I need to have multiple data sets available for the same tree grid on the page. I just have to switch to different data sets on some actions. Is there a way I can do this in DHTMLX

You may try to reload treegrid with the needed data:

treegrid.clearAll() treegrid.load(url)