title: C# group repeater control
body: <p>Is there a way to keep items in the same row based on their ID?</p>
  
  <p>Just an example:</p>
  
  <pre><code>public class productInfo {
      public string ID { get; set; }
      public string Type { get; set; }
      public string Size { get; set; }
  
  }
  
  List&lt;productInfo&gt; products = new List&lt;productInfo&gt;();
     productInfo product = new productInfo {
         ID = "14",
         Type = "TypeOne",
         Size = "SizeTwo",
     };
  products.Add(product);
  
  Repeater.DataSource = products;
  Repeater.DataBind();
  
   &lt;td class="" style=""&gt;ID: &lt;%#DataBinder.Eval(Container.DataItem, "ID")%&gt;&lt;/td&gt;
  </code></pre>
  
  <p>There is a list that stores product information. In that list there are 10 entries. 3 of entries have the same ID and 2 of the entries have the same ID. The repeater should display 1 row with the 3 entries, 1 row with the 2 entries and 5 other rows. So basically every unique ID would gets it's own row.</p>
  
  <p><a href="https://i.stack.imgur.com/6JXMS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6JXMS.png" alt="enter image description here"></a></p>
  
  <p>In the picture, for example ID 3 I show the words "ID 3" three times. But I would only want to display "ID 3" once in the output. </p>
  
  <p>Thanks</p>