2
我使用dynatree並且一切正常,但是如果節點有大量項目,我會收到錯誤消息。我已閱讀設置enableUpdate(false);
函數,但它也沒有幫助。有任何想法嗎?Dynatree在遇到超過2000個項目時返回錯誤
var serviceParams = { Type: this._fieldName };
$("#tree").dynatree({
autoFocus: false,
clickFolderMode: 1,
initAjax: {
url: tree._serviceUrl + "/top",
data: jQuery.serializeJSON(serviceParams),
type: "POST",
contentType: "application/json; charset=utf-8",
dataType: "json"
},
onLazyRead: function(node) {
//this.enableUpdate(false);
var serviceParamsForChildren =
{
Type: tree._fieldName,
parentId: node.data.key,
includeDescedants: false
};
node.appendAjax({
url: tree._serviceUrl + "/Children",
data: jQuery.serializeJSON(serviceParamsForChildren),
type: "POST",
contentType: "application/json; charset=utf-8",
dataType: "json"
});
//this.enableUpdate(true);
},
onActivate: function(node) {
tree._selectedNode = node;
}
});
謝謝,它幫助! – Alexandr
@Alexander:你應該把oleksii的回答標記爲你的問題的正確答案,這樣他就可以獲得它的聲望得分。 –