我已在此处http://jsbin.com/pakututana/1/edit发布了问题的重建。
数据应该导致在TreeTable中呈现2级深度节点。但相反,有一个幻影行使它混乱。
有什么想法吗?
谢谢
答案 0 :(得分:2)
我看到你发布的链接。您创建的JSON
不适用于TreeTable
让我指出您在代码中所犯的一些错误。
检查要点:
1. var tData = {"SessionTransactions":{}} //This is not required its unnecessarily declared
// Use this directly
var tData = {
"":{},
"SessionTransactions":{//Some Value}
};
2. tData = {
"": {},
"SessionTransactions": {
0: {
0: {},
1: {},
2: {},
3: {},
4 :{ //This was missing which leads to the empty row
"__metadata": {},
"Service": {},
"Poi": {}
}
},
1: {
0:{}
}
}
};
3. The second level child with empty rows is because of "__metadata","Service" and "Poi"
0:{
"__metadata": {},
"Service": {},
"Poi": {}
}
更改json后立即尝试。我认为它可以帮到你
答案 1 :(得分:1)
下次使用搜索,你必须清除.__ metadata =“”; - 财产...