Hi,
I seem to be having an issue with client side events and lazy loading.
I have a tv on my layout view as follows:
@Html.Kendo().TreeView().Name("MainMenu").DataSource(dataSource => dataSource
.Read(read => read.Action("Index", "MainMenu"))).DataTextField("MenuText").DataUrlField("Url")
I have code on the server that correctly returns the parts of the tv as necessary.
All is well. My tree displays. When I click on a parent node a server call is made and the children are show.
Great.
Now the trouble.
I add the following javascript and when I click on a node I get the alert just fine. However, once, I click ok, I get an error in kendo.all.min.js. Attached is a screenshot of the error.
Thanks ... Ed
I seem to be having an issue with client side events and lazy loading.
I have a tv on my layout view as follows:
@Html.Kendo().TreeView().Name("MainMenu").DataSource(dataSource => dataSource
.Read(read => read.Action("Index", "MainMenu"))).DataTextField("MenuText").DataUrlField("Url")
I have code on the server that correctly returns the parts of the tv as necessary.
All is well. My tree displays. When I click on a parent node a server call is made and the children are show.
Great.
Now the trouble.
I add the following javascript and when I click on a node I get the alert just fine. However, once, I click ok, I get an error in kendo.all.min.js. Attached is a screenshot of the error.
Thanks ... Ed
function _LayoutOnLoad(){ $(function () { $("#MainMenu").kendoTreeView({ select: OnMainMenuSelect }) });}function OnMainMenuSelect(e){ alert("Selecting: " + e.node.textContent);}