title: Telerik Treeview MVC
body: <p>I am trying to work with Telerik Treeview in MVC with C#.
  I have 3 models and need just 2 levels (root and child) of nodes.
  I need that the root node is the First Model, and the child node the Third Model.
  Both are linked by the Second Model.</p>
  
  <p>Below is the code that I have done:</p>
  
  <pre><code>@using Hant.Material.ValueObject.Domain
  @using Hant.Material.Web.Models
  
  @model IEnumerable&lt;DescriptivePatternModel&gt;
  
  @{
      Html.Telerik().TreeView()
          .Name("treeView")
          .ExpandAll(true)
          .BindTo(Model, mapping =&gt; mapping
              .For&lt;DescriptivePatternModel&gt;(binding =&gt; binding
                  .Children(descriptivePattern =&gt; descriptivePattern.Items)
                  .ItemDataBound((i, descriptivePattern) =&gt;
                  {
                      i.Text = descriptivePattern.Name;
                      i.Value = descriptivePattern.Id.ToString();
  
                  })
              )
              .For&lt;ItemModel&gt;(binding =&gt; binding
                  .ItemDataBound((i, item) =&gt;
                  {
                      i.Text = item.VersionDate.ToString();
                      i.Value = item.Id.ToString();
                  })
              )            
              ).Render();
  }
  </code></pre>
  
  <p>In this code I can only access the Second Model.</p>