Я хочу показать, что мой Kendo UI TreeView расширяется за все время, но он будет показывать только рухнувший. При перезагрузке источника данных я могу видеть вспышку расширенного дерева, но затем она рушится.Невозможно развернуть все узлы в Kendo TreeView
var locationTreeView = $("#treeViewLocations").kendoTreeView({
checkboxes: {
checkChildren: false,
template: "# if(item.showCheckbox){# <input type='checkbox' name='selectedLocations' value='#= item.value #' />#}#"
},
dataTextField: "text",
dataSource: {
transport: {
read: {
url: window.location.origin + "/api/v1/bookingrequestlocation",
dataType: "json",
type: "GET",
data: { bookingSeasonPeriodId: bookingSeasonPeriod.value() },
}
},
schema: {
model: {
id: "value",
children: "items",
hasChildren: "hasChildren",
}
}
}}).data("kendoTreeView");
expandTreeView();
function changeSeason() {
locationTreeView.dataSource.read();
expandTreeView();}
function expandTreeView() {
locationTreeView.expand(".k-item");}
просто предложение .. огонь expandTreeView() функция в событии с привязкой – MustafaP
Спасибо! Бросьте ответ ... – baddaydaddy