title: Datatable LINQ select datarow only returning one row and how to order
body: <p>I have a datatable with 4 columns</p>
  
  <pre>
  
   - A|1|Apple|Turnip
   - A|2|Water|Fruit
   - B|1|Water|Orange
   - B|2|Water|Mango
   - C|1|Hello|World
  </pre>
  
  <p>What I want to do is select distinct column A.  Then I want to select distinct columns 2,3,4 based on column A.</p>
  
  <p>This is what i'm using to select distinct column A.  My question with this first part is how do you order by column A (linkControl).  Member is my datatable, and this returns every distrinct column a</p>
  
  <pre><code>    var linkControl = Member.AsEnumerable()
                              .Select(row =&gt; new
                              {
                                  linkCon = row.Field&lt;string&gt;("LinkControl")
                              })
                              .Distinct();
  </code></pre>
  
  <p>Then because I want to iterate each of the linkCons I do the following, which only returns one datarow even though there is about 20 datarows for each linkCon.  How do i return all the rows?</p>
  
  <pre><code> foreach (var linkC in linkControl)
      {
  var linkControllink = (from DataRow dr in ADMemberships.Rows
                                 where dr["LinkControl"] == linkC.linkCon
                                 orderby (string)dr["URLDescription"]
                                 select dr);
  
  }
  
  
          foreach (var lcl in linkControllink)
          {
                  //only has one row in it
           }
  </code></pre>