or

@(Html.Kendo().DropDownListFor(model => model.EmailType) .Name("EmailType") .BindTo(Enum.GetNames(typeof (EmailTypeEnum)).ToList()) )When the popup is shown from an edit command, the value that is selected does not show in the grid after I click "Update". I can see the orange indicator that the fields is being edited in the grid, but the value is not shown.
If I do need to use a datasource object, can I use emuns as the underlying data type? If so please show an example.
Thanks
)
using System;using System.Collections.Generic;using System.Linq;using System.Web;namespace MCFD.MobilePolicy.MVC.Models{ public class SiteStructure { public SiteStructure() { } private List<string> next; private string myName = "N/A"; private List<InnerStructure> colHasChildren; private int ID; // Declare a Name property of type string: public string Name { get { return myName; } set { myName = value; } } public int id { get { return ID; } set { ID = value; } } //public bool HasChildren //{ // get // { // return hasChildren; // } // set // { // hasChildren = value; // } //} public List<InnerStructure> hasChildren { get { return colHasChildren; } set { colHasChildren = value; } } } public class InnerStructure { public InnerStructure() { } private List<string> next; private string myName = "N/A"; private List<InnerStructure> colHasChildren; private int ID; // Declare a Name property of type string: public string Name { get { return myName; } set { myName = value; } } public int id { get { return ID; } set { ID = value; } } //public bool HasChildren //{ // get // { // return hasChildren; // } // set // { // hasChildren = value; // } //} public List<InnerStructure> hasChildren { get { return colHasChildren; } set { colHasChildren = value; } } }}public JsonResult Employees(int? id) { //ulitimate goal is to transform this xml into a structure for the tree. I will deal with this later. Note that none of the bind to xml methods have worked for me. XElement xml = XElement.Load(Server.MapPath("~/App_Data/books.xml")); //Create 2 items for the tree Models.SiteStructure sitemapitem = new Models.SiteStructure(); sitemapitem.Name = "you"; sitemapitem.id = 1; Models.SiteStructure sitemapitem2 = new Models.SiteStructure(); sitemapitem2.Name = "me"; sitemapitem2.id = 2; //Create hierarchy by adding a new list to the first item in the root of items Models.InnerStructure sitemapitem3 = new Models.InnerStructure(); sitemapitem3.Name = "why does this not work?"; sitemapitem3.id = 3; List<Models.InnerStructure> sitemap2 = new List<Models.InnerStructure>(); sitemap2.Add(sitemapitem3); sitemapitem.hasChildren = sitemap2; //Add the items to list of items to return List<Models.SiteStructure> sitemap = new List<Models.SiteStructure>(); sitemap.Add(sitemapitem); sitemap.Add(sitemapitem2); return Json(sitemap, JsonRequestBehavior.AllowGet); }<div class="demo-section"> @(Html.Kendo().TreeView() .Name("treeview") .DataTextField("Name") .DataSource(dataSource => dataSource .Read(read => read .Action("Employees", "SiteEditor") ) ) ) </div>