Below is the code I have written for loading tree data
settings.init(function (_data) {
var data = _data;
settings.data = data;
for (var i = 0; i < _data.length; i++) {
var row = {
id: data[i].Id,
level: data[i].Level,
pid: data[i].PId,
name: data[i].Name,
taskType: data[i].TaskType,
startDate: data[i].StartDate,
endDate: data[i].EndDate
};
var treenode = generateTreeNode(dom_table, row, row.level);
treeData[row.id] = row;
}
});
Below is the code I have written for loading tree data settings.init(function (_data) { var data = _data; settings.data = data; for (var i = 0; i < _data.length; i++) { var row = { id: data[i].Id, level: data[i].Level, pid: data[i].PId, name: data[i].Name, taskType: data[i].TaskType, startDate: data[i].StartDate, endDate: data[i].EndDate }; var treenode = generateTreeNode(dom_table, row, row.level); treeData[row.id] = row; } });