title: getting id of selected node in kendo Treeview
body: <p>Kendo UI experts Please help me..</p>
  
  <p>I am new to Kendo ui. I want to return id of Selected node in kendo treeview in my code.
  but it is returning only same node.</p>
  
  <p>On selecting Node i want to return id of selected Node to my code, and in Code i am returning
  child elements of that node. </p>
  
  <p>is there any simple way of doing it??</p>
  
  <p>Thanks in advance..</p>
  
  <p>My Code</p>
  
  <pre><code>&lt;script src="~/Scripts/kendo.treeview.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      homogeneous = new kendo.data.HierarchicalDataSource({
          transport: {
              read: {
              url: "@Url.Action("datasourcefortree", "Home")",
              type: "POST",
              dataType: "json"
              }
          },
          schema: {
              model: {
              id: "ResourceID",
              hasChildren: true
              }
          }
      });
  
      $("#treeview").kendoTreeView({
          dataSource: homogeneous,
          dataTextField: "Resource"
      });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>and code of datasourcefortree method of homecontroller</p>
  
  <pre><code>[HttpPost]
  public JsonResult datasourcefortree(int? NodeID)
  {
  
      FNHSessionManager sessionManager = new FNHSessionManager(_connString, FNHSessionManager.DatabaseType.MsSql);
      FNHRepository repository = new FNHRepository(sessionManager);
      int nodevalue = 1;
  
      if (NodeID == null)
      {
          ResourceMaster tree = repository.RetrieveById(nodevalue);
          List node = new List{
              new ResourceMaster
              {
                  ResourceID = tree.ResourceID,
                  Resource=tree.Resource
              }
          };
          return Json(node, JsonRequestBehavior.AllowGet);
      }
      else
      {
          if (NodeID.HasValue)
          {
              nodevalue = NodeID.Value;
              IList childtreenode = repository.GetAllRecord(nodevalue);
              return Json(childtreenode, JsonRequestBehavior.AllowGet);
          }
          return (null);
      }
  }
  </code></pre>