Thanks.
But there is still another problem,
I've noticed, that the lazy loading tutorial is related only to a full hierarchic treegrid data,
only when the data structure includes the
'children' property to each parent's node.
On our case,
we're using a treegrid data which uses a flat structure of rows, where each child row has
'_parentId' property that point to its parent row id.
We actually need to load a tree data in this kind of structure:
[{"id":1,"name":"All Tasks","begin":"3/4/2010","end":"3/20/2010","progress":60,"iconCls":"icon-ok", "state":"closed"},
{"id":2,"name":"Designing","begin":"3/4/2010","end":"3/10/2010","progress":100,"_parentId":1},
{"id":21,"name":"Database","persons":2,"begin":"3/4/2010","end":"3/6/2010","progress":100,"_parentId":2},
{"id":22,"name":"UML","persons":1,"begin":"3/7/2010","end":"3/8/2010","progress":100,"_parentId":2}]
Instead of this structure:
{
"id":1,
"name":"C",
"size":"",
"date":"02/19/2010",
"children":[{
"id":2,
"name":"Program Files 2",
"size":"120 MB",
"date":"03/20/2010"},
{
"id":3,
"name":"Program Files 3",
"size":"120 MB",
"date":"03/20/2010"}
]
}
When we used the loadData method to fill the treeGrid with the flat structure (the first example),
for some reason,
its doesn't consider the _parentId property and adds all the nodes in the root level without the correct hierarchic relations.
We tried to use a similar Json as the example of "TreeGrid Actions" on your site, according to your following json:
http://www.jeasyui.com/demo/treegrid/treegrid_data2.jsonHope you'll be able to assist us on that manner,
Regards.