title: Kendo UI TreeView - how do I populate different children nodes for each parent node?
body: <p>The following populates the parent and children nodes. The issue is that the children are all the same for all the parent nodes. I need to populate the children nodes based on an "id" of the parent. How would I go about doing this?</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
      &lt;head&gt;
          &lt;title&gt;Kendo UI Test&lt;/title&gt;
          &lt;link href="styles/kendo.common.min.css" rel="stylesheet" type="text/css"/&gt;
          &lt;link href="styles/kendo.default.min.css" rel="stylesheet" type="text/css"/&gt;
          &lt;script src="js/jquery.min.js"&gt; &lt;/script&gt;
          &lt;script src="js/kendo.web.min.js"&gt; &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div id="treeview"&gt;&lt;/div&gt;
          &lt;script type="text/javascript"&gt;
              var notifications = {
                  transport: {
                      read: {
                          url: "http://..."
                      }
                  },
                  schema: {
                      model: {
                          Notification: "Notification",
                          hasChildren: false
                      }
                  }
              };
  
              var notificationTypes = new kendo.data.HierarchicalDataSource({
                  transport: {
                      read: {
                          url: "http://..."
                      }
                  },
                  schema: {
                      model: {
                          NotificationType: "NotificationType",
                          hasChildren: true,
                          children: notifications
                      }
                  }
              });
  
              $("#treeview").kendoTreeView({
                  dataSource: notificationTypes,
                  checkboxes: {
                      checkChildren: true
                  },
                  dataTextField: ["NotificationType", "Notification"]
              });
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The children nodes are gathered by an API call, as such:</p>
  
  <pre><code>/api/notifications/{id}
  </code></pre>
  
  <p>Each parent has a different ID that needs to be matched with the children.</p>
  
  <p>I'm really lost on this one and would really appreciate all the help I can get.</p>
  
  <p>Thanks</p>