title: Databind repeater using Linq with group by
body: <p>I need to bind a repeater with hierarchical data as follows:</p>
  
  <pre><code>Category1
     - Item1
     - Item2
  Category2
     - Item3
     - Item4
  </code></pre>
  
  <p>I currently have a single dataset with the items as well as the category that each item belongs to.</p>
  
  <p>I'm trying to learn Linq and was wondering if there was a way I can do the same using Linq?</p>
  
  <p>Below is what I tried:</p>
  
  <pre><code>var groupbyfilter = from dr in dtListing.AsEnumerable()
                              group dr by dr["Category"];
          DataTable dtFinal = dtListing.Clone();
  
    foreach (var x in groupbyfilter)
            x.CopyToDataTable(dtFinal, LoadOption.OverwriteChanges);
  
  
    rptList.DataSource = dtFinal;
    rptList.DataBind();
  </code></pre>
  
  <p>But trouble with it is it repeats category for each item.</p>