title: Get a complete list of parent groups from child group. (Kendo UI)
body: <p>Executable code snippet: <a href="https://demos.telerik.com/kendo-ui/grid/index" rel="nofollow noreferrer">https://demos.telerik.com/kendo-ui/grid/index</a> (Just go to this example and hit &quot;Edit&quot;)</p>
  <p>I want to display the full list of parent groups displayed as a list in the groupFooterTemplate of the child group.</p>
  <pre><code>            {
                  field: &quot;Discontinued&quot;,
                  title: &quot;In Stock&quot;,                    
                  template: &quot;&lt;span id='badge_#=ProductID#' class='badgeTemplate'&gt;&lt;/span&gt;&quot;,
                  groupFooterTemplate: (data) =&gt; { return this.getPathToDataItem(data)} ,
                  width: 130,
              }
  </code></pre>
  <p>Above I change one of the columns to reference a function getPathToDataItem(data) in its groupFooterTemplate. Now I define the function:</p>
  <pre><code>private getPathToDataItem(data): string {
      var path: string = '';
  
      //Javascript  - JQuery - Black magic goes here!
  
  
     return path;  //Should look something like Seafood/Unavailable (assuming my groups are Category, 
                     InStock in that order!)
  }
  </code></pre>
  <p>to actually get the template. I want to use javascript/jquery/kendo to get the full list of groups in play and create a path for them. So if the groups in play are Category, Instock then the template should display Seafood/Unavailable, Produce/Available, etc.</p>
  <p>My issue is I can't figure out how to get the parent groups in the child group template! The last one is easy, as that's just data.value, but how do I get the prior groups? I suspect I will need to do something like:</p>
  <p>group1/group2/.../data.value</p>
  <p>but how do I get group1, group2, and in general, groupN?</p>
  <p>Any help would be appreciated, thanks!</p>