title: Sort within group with linq
body: <p>I have a list of objects. I want to order by Date, and then by TransParentType and then by TransType. Then I want to group by TransParentType and within each group place a specific item (if it exists) at the bottom of the group (withdrawal: specific).</p>
  
  <p>Sample Data:</p>
  
  <pre><code>Date          TransParentType   TransType
  
  2015/05/20    Purchase      investment
  2015/05/20    Redemption    withdrawal: b
  2015/05/20    Redemption    zz
  2015/05/20    Redemption    withdrawal: a
  2015/05/20    Redemption    withdrawal: specific
  2015/05/20    Redemption    withdrawal: c   
  2015/05/14    Purchase      investment
  </code></pre>
  
  <p>Expected Sorted Data:</p>
  
  <pre><code>Date          TransParentType   TransType
  
  2015/05/14    Purchase      investment
  2015/05/20    Purchase      investment
  2015/05/20    Redemption    withdrawal: a
  2015/05/20    Redemption    withdrawal: b
  2015/05/20    Redemption    withdrawal: c
  2015/05/20    Redemption    withdrawal: specific
  2015/05/20    Redemption    zz  
  </code></pre>
  
  <p>I'm trying to do something like this, without much success. The GroupBy does not maintain my sorted data. This is as far as i've gotten. Not sure if there is a way to move the specific item to the bottom of the group or if i have to do it manually...</p>
  
  <pre><code>results = results.OrderBy(r =&gt; r.Date).ThenBy(r=&gt;r.TransParentType)
                               .ThenBy(r =&gt; r.TransType).ToList();
  
  var grouped = results.GroupBy(g =&gt; g.TransParentType)... 
  </code></pre>