Hi
I am trying to load a treeview using an Ajax call but with the load on demand set to false, I am looking to return the hierarchy to the client in a single call. The basic layout of the treeview is simple
@(Html.Kendo().TreeView()
.Name("AvailablePortfolios")
.DataSource(dataSource => dataSource.Read("GetSelectedClientPortfolios", "PortfolioGroup"))
.LoadOnDemand(false))
and the json returned from the client is
[{"id":10014853,"text":"Ali, Mr Jake","items":[{"id":35443,"text":"Individual Investment Account (IMF0BGNX D)","hasChildren":false},{"id":35444,"text":"ISA (IMF0BGNXSHD)","hasChildren":false}],"hasChildren":true}]
When I use this setup I find that the client is making roughly 20 - 30 requests to the server with the following request
GET /Platform/Tools/PortfolioGroup/GetSelectedClientPortfolios?id=10014853 HTTP/1.1
The Treeview then displays the first level correctly but whenever I attempt to expand out the tree I get the first node repeated.
Is there something wrong with the way my json is constructed or is there some other step I have missed. Are there any examples of an Ajax request with load on demand set to false.
Thanks
Colin
I am trying to load a treeview using an Ajax call but with the load on demand set to false, I am looking to return the hierarchy to the client in a single call. The basic layout of the treeview is simple
@(Html.Kendo().TreeView()
.Name("AvailablePortfolios")
.DataSource(dataSource => dataSource.Read("GetSelectedClientPortfolios", "PortfolioGroup"))
.LoadOnDemand(false))
and the json returned from the client is
[{"id":10014853,"text":"Ali, Mr Jake","items":[{"id":35443,"text":"Individual Investment Account (IMF0BGNX D)","hasChildren":false},{"id":35444,"text":"ISA (IMF0BGNXSHD)","hasChildren":false}],"hasChildren":true}]
When I use this setup I find that the client is making roughly 20 - 30 requests to the server with the following request
GET /Platform/Tools/PortfolioGroup/GetSelectedClientPortfolios?id=10014853 HTTP/1.1
The Treeview then displays the first level correctly but whenever I attempt to expand out the tree I get the first node repeated.
Is there something wrong with the way my json is constructed or is there some other step I have missed. Are there any examples of an Ajax request with load on demand set to false.
Thanks
Colin