problem with loading data in KendoTreeView

3 posts, 0 answers
  1. karyjon
    karyjon avatar
    6 posts
    Member since:
    Oct 2012

    Posted 22 Oct 2012 Link to this post

    My Data doesn't load in tree view.

    please see my source code first.

    public JsonResult LoadOrganizationChart([DataSourceRequest] DataSourceRequest request)
                var employee = EmployeSystemEntityOperator.GetEntityListOf<OrganizationChart>();
                DataSourceResult result = employee.ToDataSourceResult(request);
                return Json(result,JsonRequestBehavior.AllowGet);

    @using Kendo.Mvc.UI
    @model IEnumerable<Ets.Data.EmployeeSystem.OrganizationChart>
          .DataSource(dataSource => dataSource.Read(read => read.Action("LoadOrganizationChart", "OrganizationChart")))

    i trace the result with firebug and attach the image.
    i see my data in Firebug --> Net -->XHR --> Json
    but my data don't show in tree view.
    Any One?? Any Idea???
  2. Greg
    Greg avatar
    19 posts
    Member since:
    Jun 2012

    Posted 20 Nov 2012 Link to this post

    have a look at

    treeview and checkboxes: a Solution

    it may point you in the right direction, especially with the controller method; I think you may be missing the 'Select' part of the L2E query
  3. Hari
    Hari avatar
    10 posts
    Member since:
    Oct 2012

    Posted 10 Dec 2012 Link to this post

    Hi karyjon,
    We are stuck with the same situation. Can you help us?

    I am trying to convert my sample XML file as JSON object and set that as a datasource to my tree view control. Its not working. I am sure that I am missing something here but not sure what's that. Please help me.

     Here is my code in Controller class where I am loading the XML file and retruning as JSON

            public JsonResult Employees()

                XElement xdoc = XElement.Load("C:\\Users\\a409114\\Desktop\\TreeView.xml");
                return Json(xdoc, JsonRequestBehavior.AllowGet);

    Here is my code in the view file where I am invoking the action name "Employees" in my controller class "TreeViewController".

    <div class="demo-section">
        .DataSource(dataSource => dataSource
            .Read(read => read
                .Action("Employees", "TreeView")

    <style scoped>
    .demo-section {
        width: 200px;

    Here is my sameple XML file:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

    This is not loding the Tree View Control!

Back to Top