I am creating a treeview, loaded from remote hierarchical data, similar to
I am trying to understand this line in the controller:
hasChildren = e.Employees1.Any()
I assume that the employee model has a property where it checks for children. Where can I actually look at the model? Can I download all the demos along with the data model?
3 Answers, 1 is accepted
This is the complete Employee model used in the MVC examples:
As you can see, Employee1 is a HashSet of Employee objects that allows us to have a list without duplicates of all the employees that work under another. In the case of hasChildren = e.Employees1.Any() we are checking if there is at least one Employee in the HashSet.
There are two ways to get the source code for all the MVC demos. The first one is to get them through the Telerik Control Panel: after you select to update or install UI for ASP.NET MVC and hit proceed, check the Local Demos box and finish the rest of the process. The second way is to go to Your Account page in Telerik's website and find UI for ASP.NET MVC under your products list, select Browse all product files and download the Manual Installation compressed file; it contains the Kendo.Mvc.Examples solution.
I hope this helps.
No such link called "Browse all product files" exists. Or, if it does, it's hiding in plain sight. In any case, I can't find it.
The Telerik UI for ASP.NET MVC ships a Sample Application that is a mirror of the ASP.NET MVC Demos site. You can find additional information on how to set it up from the following article:
With this application, you will be able to run and examine all of the demos locally, modify them and test the different configuration options and get familiar with how each widget works.