Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, i want use mvc kendo ui treeview and load children node when selected node but i don't Know implement it, please help me?



C#
public JsonResult Employees(string  id)
{
    var dataContext = new Data.ISMSEntities();

    var employees = from e in dataContext.Assets
                    where (string.IsNullOrEmpty(id)?e.LocationID_FK==null: e.LocationID_FK == id)
                    select new
                    {
                        id = e.LocationID_FK,
                        Name = e.asName
                        ,
                        //hasChildren = e.asName.Any()
                        hasChildren=true
                    };
    int i=employees.Count();
    return Json(employees, JsonRequestBehavior.AllowGet);
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900