title: Remote binding for treeview in MVC
body: <p>I can get only the level 1 items and the items which have children show an arrow sign next to it, but on expanding them I get those top level items again. So, this is going on in a kind of loop. I am unble to show Level 2. This is my first time with the kendo treeview. My codes are as-</p>
  
  <pre><code> @(Html.Kendo().TreeView()
            .Name("treeview")
            .DataTextField("Name")
            .LoadOnDemand(true)
            .HighlightPath(true)
            .DataSource(dataSource =&gt; dataSource
                  .Read(read =&gt; read
                  .Action("EntitiesForTreeView", "Home")
  
          ))
  </code></pre>
  
  <p>And controller code is- </p>
  
  <pre><code> public JsonResult EntitiesForTreeView()
      {
          List&lt;UserGuide&gt; userGuideList = GetUserGuideInfo();
  
          var myEntity = from e in userGuideList
                         where (e.Level == "L1")
                         select new
                         {
                             id = e.ID,
                             Name = e.UserGuideDescription,
                             hasChildren = (from x in userGuideList
                                            where x.ScreenName == e.ScreenName &amp;&amp;
                                              x.Level == "L2"
                                            select x).Any()
                         };
          return Json(myEntity, JsonRequestBehavior.AllowGet);
      }
  </code></pre>
  
  <p><strong>userGuideList</strong> has all the 6 rows, and <strong>myEntity</strong> has the 4 Level 1 items as per my DB.
  My database structure is as follows(Id 5 and 6 should be under Id 1)</p>
  
  <p>Id  <strong>Type</strong>    <em>Des</em>   <strong>Level</strong><br/>
  <br/>
  1   <strong>Main</strong>    <em>All</em>   <strong>L1</strong><br/>
  2   <strong>Price</strong>   <em>Future</em> <strong>L1</strong><br/>
  3   <strong>notes</strong>   <em>Create notes</em> <strong>L1</strong><br/>
  4   <strong>Events</strong>  <em>events affecting price</em> <strong>L1</strong><br/>
  5   <strong>Main</strong>    <em>Create index</em> <strong>L2</strong><br/>
  6   <strong>Main</strong>    <em>Filter items</em> <strong>L2</strong></p>