Treegrid's node id can't be number 0. If id is number 0, and its children nodes cannot access the node by method "getParent". The "getParent" always return null. If id is string "0", it's all ok.
such as:
A:
[{
"id":1,
"name":"C",
"children":[{
"id":2,
"name":"Program Files"
}]
}]
B:
[{
"id":0,
"name":"C",
"children":[{
"id":2,
"name":"Program Files"
}]
}]
C:
:
var parent = $('#tg').treegrid('getParent', 2);
For code A, parent in C is right; For code B, parent is always null.