Hi,
I have a tree view which uses dynamic loading from server when expanded. In my case there are two different URL's from where the initial and the child data is to be fetched. I tried changing the read URL from script but it is defaulted back when the user expands the tree which should not be the case.
Below is my tree
@(Html.Kendo().TreeView()
.Name("MyTree")
.DataTextField("Name")
.DataSource(dataSource => dataSource
.Read(read => read.Url("../api/User/?getAll=false").Type(HttpVerbs.Get))
)
)
I then change the read url in script as following
var tree = $("#MyTree").data("kendoTreeView");
tree.dataSource.transport.options.read.url = "../api/User/?getChildren=true";
But when the tree is expanded the URL is still /api/User/?getAll=false&id=1 instead of ./api/User/?getChildren=true&id=1
I have a tree view which uses dynamic loading from server when expanded. In my case there are two different URL's from where the initial and the child data is to be fetched. I tried changing the read URL from script but it is defaulted back when the user expands the tree which should not be the case.
Below is my tree
@(Html.Kendo().TreeView()
.Name("MyTree")
.DataTextField("Name")
.DataSource(dataSource => dataSource
.Read(read => read.Url("../api/User/?getAll=false").Type(HttpVerbs.Get))
)
)
I then change the read url in script as following
var tree = $("#MyTree").data("kendoTreeView");
tree.dataSource.transport.options.read.url = "../api/User/?getChildren=true";
But when the tree is expanded the URL is still /api/User/?getAll=false&id=1 instead of ./api/User/?getChildren=true&id=1