Hello,
Here is the situation. I have a treeview that basically represents directory, sub-directory and files. For some reasons, I can't use the LoadOnDemand option. So I load all the tree in my controller.
Everything works fine except that it seems the Databound event is triggered for each directory and subdirectory. I was expecting the event to be triggered only once when all data are "loaded" from the datasource.
At the end, I need to expand some nodes everytime the datasource is refreshed
This is my treeview
@(Html.Kendo().TreeView()
.Name("treeview")
.DataTextField("name")
.LoadOnDemand(false)
.DataSource(datasource => datasource.Read(read => read.Action("Tree_Read_All", "MyController"))
.Model(model => model.Children("childrens")))
.DragAndDrop(true)
.Events(events => events
.Select("treeViewOnSelect")
.Drop("treeViewOnDrop")
.DataBound("treeViewDataBound")
)
)
Thanks in advance
Here is the situation. I have a treeview that basically represents directory, sub-directory and files. For some reasons, I can't use the LoadOnDemand option. So I load all the tree in my controller.
Everything works fine except that it seems the Databound event is triggered for each directory and subdirectory. I was expecting the event to be triggered only once when all data are "loaded" from the datasource.
At the end, I need to expand some nodes everytime the datasource is refreshed
This is my treeview
@(Html.Kendo().TreeView()
.Name("treeview")
.DataTextField("name")
.LoadOnDemand(false)
.DataSource(datasource => datasource.Read(read => read.Action("Tree_Read_All", "MyController"))
.Model(model => model.Children("childrens")))
.DragAndDrop(true)
.Events(events => events
.Select("treeViewOnSelect")
.Drop("treeViewOnDrop")
.DataBound("treeViewDataBound")
)
)
Thanks in advance