I'm using the MVC TreeView and I'm binding to a datasource as below:
The .Read("ReadDirectoryGetDirs", "Documents") - everything works fine. However in the controller action if any error occurs the TreeView hangs (waits indefinitely) what I want to do is handle any errors in the controller action return the error to page, handle the error and then cancel the databind on the treeview. Is it possible to cancel the databind for the treeview?
@(Html.Kendo().TreeView()
.Name("tvDocumentDirs")
.DataTextField("Name")
.DataSource(dataSource => dataSource
.Model(m => m.Id("Path").HasChildren("HasChildren"))
.Read("ReadDirectoryGetDirs", "Documents").Events(e=>e.RequestEnd("tvDocumentDirs_onRequestEnd").Error("tvDocumentDirs_onError"))
)
.Events(events => events
.Select("tvDocumentDirs_onSelect")
.Change("tvDocumentDirs_onChange")
)
)
The .Read("ReadDirectoryGetDirs", "Documents") - everything works fine. However in the controller action if any error occurs the TreeView hangs (waits indefinitely) what I want to do is handle any errors in the controller action return the error to page, handle the error and then cancel the databind on the treeview. Is it possible to cancel the databind for the treeview?